Entering edit mode
I am trying to use the abs() function in my data. but it seems that the funtion is concidering the column names as variables, and since they are not numeric it is giving me an error. I had used the same code with another batch of data and it worked fine but i seem to be having problems now. I had updated my BiocManager package do you think that has an effect on it?
"counts is a data matrix with genes as rownames, and number id on the column name. the rest is simply numbers, with negatives and positives but they aren't integers
> AbsVal <- data.frame(abs(counts))
Error in Math.data.frame(counts) :
non-numeric-alike variable(s) in data frame: X14, X102, X243, X369, X370, X56, X193, X242
this is the error messege i keep receiving.
try
abs(data.matrix(counts))
This will solve the problem if some of your columns are character representations of numbers.
If it doesn't solve your problem you will have to tell us more about
counts
, perhaps the result oftable(sapply(counts,class))
, orstr(counts)
if the latter is not too voluminous.