SimBlobs: Blobs

Description Usage Arguments Value Examples

View source: R/SimBlobs.R

Description

Simulate from isometric Gaussian blobs.

Usage

1
SimBlobs(N, nFeatures = 3, centers = NULL, centerBox = c(-10, 10), seed = NULL)

Arguments

N

If an integer the number of data points per blob, if a vector the number of data points for each blob.

nFeatures

The number of features for each blob (default = 3).

centers

The centers of the blobs (default = NULL).

centerBox

The bounding box for centers when generated randomly (default = c(-10, 10)).

seed

seed for RNG (default = NULL).

Value

list(x = x, y = y, centers = centers)

Examples

1
2
3
4
5
6
7
8
N = c(2,2,2)
centers = matrix(c(1,10,35, 67,6,7), ncol = 2)
SimBlobs(N, centers = centers)

N = 10
centers = 3
centerBox = c(0,1)
SimBlobs(N, centers = centers, centerBox = centerBox, seed = 1)

feji3769/simplesim documentation built on Dec. 12, 2020, 10:16 a.m.