bdm.init: Create bdm instance

Description Usage Arguments Value Examples

View source: R/bdm_main.R

Description

Creates a bdm instance.

Usage

1
2
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

1
2
3
4
5
6
# --- 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)

bigMap documentation built on July 8, 2020, 6:41 p.m.