Learn R Programming

cardinalR (version 1.0.6)

gen_bkgnoise: Generate Background Noise Data

Description

This function generates background noise data with specified parameters such as the number of samples, number of dimensions, mean, and standard deviation.

Usage

gen_bkgnoise(n = 500, p = 4, m = rep(0, p), s = rep(2, p))

Value

A data containing the generated background noise data.

Arguments

n

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

p

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

m

A numeric vector (default: c(0, 0, 0, 0)) representing the mean along each dimensions.

s

A numeric vector (default: c(2, 2, 2, 2)) representing the standard deviation along each dimensions.

Examples

Run this code

# Generate background noise with custom mean and standard deviation
set.seed(20240412)
gen_bkgnoise(n = 500, p = 4, m = c(0, 0, 0, 0), s = c(2, 2, 2, 2))

Run the code above in your browser using DataLab