This is a test version of Biostars. For the public version, visit https://www.biostars.org.
"Error in FUN(left, right) : non-numeric argument to binary operator" error

Hello all,

I'm trying to get log2 fold value and getting "Error in FUN(left, right) : non-numeric argument to binary operator" error. Attached is the snippet of my data, command and the error. Please, someone help.

Thanks!!

https://postimg.cc/image/mdcnajfi9/

r

1 answer

Your first column is the issue. It is not a number. Remove first column and log the data. Some thing like log2(data[,-1]+1). See if following is what you want:

results=data
results[,-1]=log2(results[,-1]+1)

This works because values in results df is log2 of data df except for 1 column.

Thank you very much! It worked like a magic..

np. next time, please add some data, instead of image. Good luck and accept the post as answer.

Log in to answer this question.