use_distance | R Documentation |
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.
use_distance(distance_name)
distance_name |
A character string specifying the name of the distance that the user aims at implementing. |
Nothing.
use_distance("euclidean")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.