Description Usage Arguments Value Author(s) Examples
Return or set the extra data columns of an object of class
genalex. When getting extra data columns, if there are
none, NULL is returned. When setting, this is more than a
shortcut for attr(x, "extra.columns") <- value. It checks
that both value and x have the same number of rows,
generating an error if not, and it sets the row names of
value to be equal to the sample names in x before
assigning value to the "extra.columns" attribute.
1 2 |
x |
An annotated data frame of class |
value |
When setting extra columns, a data frame or object
that can be coerced to a data frame. This is done using
|
... |
Additional arguments, currently ignored |
A data frame containing extra columns from x, or
NULL if extra columns do not exist. If setting, an object
of class genalex with its "extra.columns" attribute
set to value, after its rownames are adjusted as described
above.
Douglas G. Scofield
1 2 3 4 5 6 | data(Qagr_adult_genotypes)
x1 <- attr(Qagr_adult_genotypes, "extra.columns")
x2 <- extra(Qagr_adult_genotypes)
## there are no extra columns, so both should be NULL
if (! isTRUE(all.equal(x1, x2)) || ! is.null(x1) || ! is.null(x2))
cat("something went wrong")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.