Hi, I formed a 49 by 3 data frame by reading in a text file using read.table(), and combining it with a matrix that I made by using unlist() on a list of character strings. I would like to do some simple arithmetic operations on the elements in the data frame columns (e.g. column 3/column2) but the values in the data frame are stored as factors and using stringsAsFactors=FALSE did not work. I get this error when doing arithmetic operations: In Ops.factor(dataframe$col3, dataframe$col2) : / not meaningful for factors Is there a way to store these values not as factors or convert them to numeric values? Or a way to do operations on factors in data frames? I know R has I() but that didn't help in this case. Thanks so much.
[[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.