View source: R/as_data_frame.R
as.data.frame.locus | R Documentation |
This converts a locus
object into a data.frame
so that
you can use locus
objects in a column of a data.frame
.
## S3 method for class 'locus'
as.data.frame(x, ...)
x |
An object of type |
... |
Additional objects that are passed to |
A data.frame
object.
If you do not assign a data name to the x
in assignment (e.g.,
TPI=x ) it will name the column in the data.frame
the same as the name
of the variable you assigned it. If this is confusing see the examples.
Rodney J. Dyer rjdyer@vcu.edu
loc1 <- c( locus(1:2), locus(1:2), locus( c(1,1) ) )
df <- data.frame( ID=1:3, NAMED_LOCUS=loc1, loc1 )
summary(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.