bdm.init {bigMap}R Documentation

Create bdm instance

Description

Creates a bdm instance.

Usage

bdm.init(dSet.name, dSet.data, labels = NULL, is.distance = F,
  check.duplicates = T)

Arguments

dSet.name

The name given to the input dataset. This name will be used to automatically generate a name to save the output as an .Rdata file.

dSet.data

A data.frame or matrix with raw input-data. The dataset must not have duplicated rows.

labels

If available, labels can be included as a separate vector of length equal to nrow(dSet.data). Label values are factorized as as.numeric(as.factor(labels)).

is.distance

A logical value (FALSE by default). TRUE indicates that the raw data is indeed a distance matrix.

check.duplicates

If set to TRUE (default value) the dataset is checked for duplicated rows. Checking for duplicates in big datasets can take some time. If the dataset is known to have no duplicates disabling this option will save time.

Value

A bdm instance. A bdm instance is initially a list with a few elements to which new elements are added at each step of the mapping protocol.

Examples


# --- get a matrix with raw-data
mydata <- matrix(rnorm(10000, mean = 0, sd = 3),  ncol = 2)
mylabels <- apply(mydata, 1, function(row) round(sqrt(sum(row**2)), 0))
# --- create a \var{bdm} instance with our raw-data matrix
mybdm <- bdm.init('mydataset', mydata, labels = mylabels)
str(mybdm)

[Package bigMap version 2.3.1 Index]