Learn R Programming

BDgraph (version 2.43)

transfer: transfer for discrete data

Description

Transfers discrete data, by counting the duplicated rows.

Usage

transfer( r_data )

Arguments

r_data

An (\(n \times p\)) matrix or a data.frame corresponding to the data (\(n\) is the sample size and \(p\) is the number of variables).

Value

data

An (\(n \times p+1\)) matrix of transferred data, in which the last column is the frequency of duplicated rows.

References

Mohammadi, A. and E. Wit (2015). BDgraph: An R Package for Bayesian Structure Learning in Graphical Models, arXiv preprint arXiv:1501.05108v2

Dobra, A. and A. Mohammadi (2017). Loglinear Model Selection and Human Mobility, arXiv preprint arXiv:1711.02623

See Also

bdgraph.sim, bdgraph.mpl and bdgraph

Examples

Run this code
# NOT RUN {
# Generating multivariate binary data from a 'random' graph
data.sim <- bdgraph.sim( n = 12, p = 4, size = 4, type = "discrete", cut = 2 )
r_data     <- data.sim $ data
r_data
   
# Transfer the data
transfer( r_data )
  
# }

Run the code above in your browser using DataLab