Description Usage Arguments Details Value See Also
This function creates a phenotype object.
1 2 3 4 5 6 | phenotype(data, .formula = NULL, .id = NULL, .gender = NULL,
.groupBy = NULL, .include = NULL, .exclude = NULL)
is.phenotype(x)
is.summary_phenotype(x)
|
data |
a data frame (or object coercible by as.data.frame to a data frame) containing the variables in the model. |
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.The details of model specification are given under 'Details' in the "lm" help file. |
id |
(optional) column name identifier of the unique subjects in
|
gender |
(optional) column name identifier for the gender in |
include |
(optional) character vector of the subjects in |
exclude |
(optional) character vector of the subjects in |
reduce |
logical. Should the dataset be reduced to only columns used in formula. See Details |
data
and formula
are similar to what is needed for
lm
. If a formula is not specifed, no further analysis will run.
If the id
is not specified it is assumed that the rownames in
data
are the unique subject identifier. If id
is specifed
then rownames(data)
will be set to id
. Thus the subject id's
must be unique and without duplication.
If the gender column is not specified it will be set to NULL
.
Typically either include
or exclude
, or both, is set to
NULL
. It is important to note that return include
and
exclude
are taken from the subjects in data
and not from the input parameters.
[TBD: explain include/exclude]
If reduce == TRUE
then data
is reduced to a data.frame
containing the variables used in formula
plus gender
. See
get_all_vars for specifics.
an object of class 'phenotype'. This is a list typicaly used to feed into an analysis function.
An object of class 'phenotype' is a list containing at least the following components:
data data frame of the data for analysis
formula formula to be used in further analysis
gender column name containing the gender of the subjects
include the subjects in data
that will be included is further analysis.
exclude the subjects in data
that will be excluded is further analysis.
It is important to note that return include
and exclude
are taken from data and not from the input parameters.
get_all_vars
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.