Description Usage Arguments Value Note Author(s) Examples
convert each character
column in a data frame to a factor
.
1 | char2fac(x)
|
x |
a |
A data.frame
with character
columns converted in factor
columns.
This is an utility to quickly transform a character
vector to factor
for analysis purpose.
Giorgio Arcara.
1 2 3 4 5 6 7 8 |
dat=data.frame(RT=rnorm(20, mean=500, sd=100), Subject=rep(1:10, 2))
conditions=c(rep("a", 10), rep("b", 10))
dat$conditions=conditions
dat=char2fac(dat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.