spiral_data: Generating spiral sample

View source: R/sampling_functions.R

spiral_dataR Documentation

Generating spiral sample

Description

n-2 points are drawn from a normal distribution with mean=0, sd=1, the points in the final two direction are sampled along a spiral by samping the angle from a normal distribution with mean=0, sd=2*pi (absolute values are used to fix the orientation of the spiral).

Usage

spiral_data(n, p)

Arguments

n

number of sample points to generate

p

sample dimensionality

Value

sample points in matrix format

Examples

spiral_data(100, 4)

spinebil documentation built on Nov. 5, 2025, 7:35 p.m.