sandsky ha scritto:
Data has the first row for variable name and the first column for sample
name. I want to take "Log" for all data, but how to compute without the
first column for sample name.

log.raw_data=log(raw_data,base=2)
Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, : non-numeric variable in data frame: sample_id

Thank you in advance,

Jin
You are trying to calculate a logarithm for a character variable.
You most probably imported the data with read.table (....header = FALSE).
try

sapply(raw_data, is.numeric)

to see which are the columns that contains "logarithmizable" items

8rino

______________________________________________
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.

Reply via email to