File: rsextrobj.Rd

package info (click to toggle)
raschsampler 0.8-4-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 336 kB
  • ctags: 14
  • sloc: f90: 400; makefile: 1
file content (67 lines) | stat: -rwxr-xr-x 2,572 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
\name{rsextrobj}
\alias{rsextrobj}
\title{Extracting Encoded Sample Matrices}
\description{
  Utility function to extract some of the generated matrices, still in encoded form.
}
\usage{
rsextrobj(RSobj, start = 1, end = 8192)
}
\arguments{
  \item{RSobj}{object as obtained from using \code{rsampler}}
  \item{start}{number of the matrix to start with. When specifying 1
              (the default value) the original input matrix is
               included in the output object.
              }
  \item{end}{last matrix to be extracted. If \code{end}
             is not specified, all matrices from \code{RSobj}
             are extracted (the maximal value is 8192, see
             \code{rsctrl}). If \code{end} is larger than
             the number of matrices stored in \code{RSobj},
             \code{end} is set to the highest possible value
             (i.e., \code{n_tot}).
            }
}
\value{
   A list of class \code{\link{RSmpl}} with components
  \item{n}{number of rows of the input matrix}
  \item{k}{number of columns of the input matrix}
  \item{inpmat}{the input matrix}
  \item{tfixed}{\code{TRUE}, if diagonals of \code{inpmat} are fixed}
  \item{burn_in}{length of the burn in process}
  \item{n_eff}{number of generated matrices (effective matrices)}
  \item{step}{controls the number number of void matrices generated in the burn in
              process and when effective matrices are generated (see note
              in \code{\link{rsctrl}}). }
  \item{seed}{starting value for the random number generator}
  \item{n_tot}{number of matrices in \code{outvec}.}
  \item{outvec}{vector of encoded random matrices}
  \item{ier}{error code}
}
\note{By default, all generated matrices plus
      the original matrix (in position 1) are contained in
      \code{outvec}, thus \code{n_tot = n_eff + 1}. If
      the original matrix is not in \code{outvec} then
      \code{n_tot = n_eff}.\cr
      For saving and loading objects
      of class \code{RSobj} see the example below.

      For extracting a decoded (directly usable) matrix use \code{\link{rsextrmat}}.
}
\seealso{\code{\link{rsampler}}, \code{\link{rsextrmat}} }
\examples{
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)

\dontrun{
save(some_m, file = "some.RSobj")
some_new <- load("some.RSobj")
summary(some_new)
}
}
\keyword{misc}