Skip to contents

This function adds a distance function to the package. It first creates the R/{distance_name}Distance.R file with the R wrapper function for the distance function. It then creates the src/{distance_name}Distance.cpp file with the C++ implementation of the distance function. It finally opens the latter file in the default editor. The user will be able to implement the desired distance function in a way compatible with the RcppParallel workflow.

Usage

use_distance(distance_name)

Arguments

distance_name

A character string specifying the name of the distance that the user aims at implementing.

Value

Nothing.

Examples

# \donttest{
use_distance("euclidean")
#> NULL
# }