Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/BioGeoBEARS_generics_v1.R
Shortcut for: tmp_rownames = 1:nrow(x);
as.data.frame(x, row.names=tmp_rownames,
stringsAsFactors=FALSE)
1 | adf2(x)
|
x |
matrix or other object transformable to data.frame |
This function, and adf2
, are useful for
dealing with errors due to automatic conversion of some
columns to factors. Another solution may be to prepend
options(stringsAsFactors = FALSE)
at the start of
one's script, to turn off all default stringsAsFactors
silliness.
In adf2, rownames are forced to be numbers; this can
prevent errors due to e.g. repeated rownames after an
rbind
operation.
data.frame
Nicholas J. Matzke matzke@berkeley.edu
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.