Learn R Programming

cardinalR (version 1.0.6)

gen_wavydims2: Generate Random Noise Dimensions With Wavy Pattern

Description

This function generates random noise dimensions by adding wavy patterns.

Usage

gen_wavydims2(n = 500, p = 4, x1_vec)

Value

A data containing the generated random noise dimensions.

Arguments

n

A numeric value (default: 500) representing the sample size.

p

A numeric value (default: 4) representing the number of dimensions.

x1_vec

A numeric vector representing the first dimension of the data structure.

Examples

Run this code
set.seed(20240412)
theta <- seq(0, 2 * pi, length.out = 500)
x1 <- sin(pi) * cos(theta)
gen_wavydims2(n = 500, p = 4, x1_vec = x1)

Run the code above in your browser using DataLab