bdm.init {bigMap}R Documentation

Create bdm instance


Creates a bdm instance.


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


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.

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


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


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


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.


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.


# --- 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)

[Package bigMap version 2.3.1 Index]