char2fac: convert characters to factors

Description Usage Arguments Value Note Author(s) Examples

Description

convert each character column in a data frame to a factor.

Usage

1

Arguments

x

a data.frame in which columns are to be converted.

Value

A data.frame with character columns converted in factor columns.

Note

This is an utility to quickly transform a character vector to factor for analysis purpose.

Author(s)

Giorgio Arcara.

Examples

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)


Search within the erpR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.