Question: "Error in FUN(left, right) : non-numeric argument to binary operator" error
0
gravatar for amoyar.dever
11 months ago by
amoyar.dever0 wrote:

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 • 2.5k views
ADD COMMENTlink modified 11 months ago by cpad011211k • written 11 months ago by amoyar.dever0
0
gravatar for cpad0112
11 months ago by
cpad011211k
India
cpad011211k wrote:

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 COMMENTlink modified 11 months ago • written 11 months ago by cpad011211k

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

ADD REPLYlink written 11 months ago by amoyar.dever0

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

ADD REPLYlink modified 11 months ago • written 11 months ago by cpad011211k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1619 users visited in the last hour