Learn R Programming

RaschSampler (version 0.8.0)

rsextrobj: Extracting Sample Matrices

Description

Utility function to extract some of the generated matrices.

Usage

rsextrobj(RSobj, start = 1, end = 8192)

Arguments

RSobj
object as obtained from using rsampler
start
number of the matrix to start with. When specifying 1 (the default value) the original input matrix is included in the output object.
end
last matrix to be extracted. If end is not specified, all matrices from RSobj are extracted (the maximal value is 8192, see rsctrl). If end is larger than

Value

  • A list of class RSmpl with components
  • nnumber of rows of the input matrix
  • knumber of columns of the input matrix
  • inpmatthe input matrix
  • tfixedTRUE, if diagonals of inpmat are fixed
  • burn_inlength of the burn in process
  • n_effnumber of generated matrices (effective matrices)
  • stepcontrols the number number of void matrices generated in the the burn in process and when effective matrices are generated (see note in rsctrl).
  • seedstarting value for the random number generator
  • n_totnumber of matrices in outvec.
  • outvecvector of encoded random matrices
  • iererror code

See Also

rsampler

Examples

Run this code
ctr <- rsctrl(burn_in = 10, n_eff = 3, step=10, seed = 0, tfixed = FALSE)
mat <- matrix(sample(c(0,1), 50, replace = TRUE), nr = 10)
all_m <- rsampler(mat, ctr)
summary(all_m)

some_m <- rsextrobj(all_m, 1, 2)
summary(some_m)

save(some_m, file = "some.RSobj")
some_new <- load("some.RSobj")
summary(some_new)

Run the code above in your browser using DataLab