"Error in FUN(left, right) : non-numeric argument to binary operator" error
1
0
Entering edit mode
5.9 years ago

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 • 19k views
ADD COMMENT
0
Entering edit mode
5.9 years ago

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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1963 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6