https://github.com/cran/BDgraph
Raw File
Tip revision: 3a6c731b58d1fb11c921ac7e82d90325385a4d78 authored by Reza Mohammadi on 17 April 2018, 13:25:21 UTC
version 2.46
Tip revision: 3a6c731
trensfer.Rd
\name{transfer}
\alias{transfer}

\title{ transfer for discrete data }

\description{ Transfers discrete data, by counting the duplicated rows.  }

\usage{ transfer( r_data ) }

\arguments{
  \item{r_data}{ An (\eqn{n \times p}{n x p}) matrix or a \code{data.frame} corresponding to the data (\eqn{n} is the sample size and \eqn{p} is the number of variables). }
}

\value{
\item{data}{ An (\eqn{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). \pkg{BDgraph}: An \code{R} Package for Bayesian Structure Learning in Graphical Models, \emph{arXiv preprint arXiv:1501.05108v2} 

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

\author{ Reza Mohammadi and Adrian Dobra }

\seealso{ \code{\link{bdgraph.sim}}, \code{\link{bdgraph.mpl}} and \code{\link{bdgraph}} }

\examples{
\dontrun{
# 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 )
  
}
}
back to top