use_distance: Adds a distance function to the package

View source: R/dev_package.R

use_distanceR Documentation

Adds a distance function to the package

Description

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


use_distance("euclidean")


distops documentation built on May 29, 2024, 1:59 a.m.