readData | R Documentation |
Reads observed counts of either the number of groups or the size of the groups. The file must have only two columns. One of the columns must be labelled P or S and the other count. It does not matter if the column names are in upper case or not. The P column can have labels 0, 1, 2, ... representing the observation of 0, 1, 2, or more groups. The corresponding count column should contain a positive (non-zero) count for each number of groups. Similarly, if the file contains S counts, then the S column can contain labels 1, 2, ... representing the observation of 1, 2, ... fragments in a group. Note that zeros are neither allowed, or useful, in the file as they both simply result in log-likelihood terms of zero, and therefore make no difference.
readData(fileName, notes = NULL, ...)
fileName |
the name of the file to be read. Must be either a modern (xlsx) Excel file or a csv file. |
notes |
any additional information about the data, such as the source or a reference. |
... |
any additional parameters which will be passed to either
|
an object of class psData
which is a list containing member
variables:
type
– either "P"
or "S"
data
– a data.frame
which contains columns
n
and rn
, representing the number of groups/fragments, and the
number of times that was seen, respectively.
notes
— either a bibentry
or a character
string which allows extra information about the data to be stored, such as
the source, or reference.
p = readData(system.file("extdata", "p.xlsx", package = "fitPS"))
p
s = readData(system.file("extdata", "s.xlsx", package = "fitPS"))
s
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.