View source: R/as.data.frame.psData.R
as.data.frame.psData | R Documentation |
psData
to a data.frame
Converts an object of class psData
—see readData
—to a
data.frame
that can be used with in functions in other packages such as
vglm
to fit more complicated models.
## S3 method for class 'psData'
as.data.frame(x, ...)
x |
an object of class |
... |
any other arguments passed to |
If x
is a psData
object of type "P"
, i.e. it
relates to numbers of groups of glass, then a data.frame
with a single variable
count
will be return where count = rep(x$data$n + 1,
x$data$rn)
. The counts have one added to them because the zeta
distribution requires that the counts are greater than or equal to one. If
x
is a psData
object of type "P"
, i.e. it relates to
group sizes, then a data.frame
with a single variable count
will be return where count = rep(x$data$n, x$data$rn)
.
a data.frame
with a single variable count
. The number
of rows in the data.frame
is equal to sum(x$data$rn)
.
p = readData(system.file("extdata", "p.xlsx", package = "fitPS"))
p.df = as.data.frame(p)
table(p.df$count)
p$data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.