openmolecules.org

 
Home » DataWarrior » Cheminformatics » Removing "NaN points" from graphs or formula to avoid "NaN" results
Removing "NaN points" from graphs or formula to avoid "NaN" results [message #1734] Mon, 12 September 2022 13:48 Go to next message
Charlene is currently offline  Charlene
Messages: 2
Registered: September 2022
Junior Member
Dear team,
First of all, thanks a lot for this useful forum, I already found answers to my questions in the previous topics!
However I was not able to find an answer to this issue that I encountered:
- I added calculated values with some formula from different columns. However, in these columns, some rows do not have values and are empty, therefore the calculation gave "NaN"
- The problem is that when I draw a 2D graph, the "NaN" values are also reported on the graph as "0" all on the bottom which is not useful.

My questions are:
- is there a function like there is on excel which allows to get an empty box if the result of the calculation is 0?
- and/or is it possible to remove all the "NaN" points from the graphs?

Many thanks in advance for your return,
Kind regards,
Charlène
Re: Removing "NaN points" from graphs or formula to avoid "NaN" results [message #1737 is a reply to message #1734] Tue, 13 September 2022 21:42 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Dear Charlène,

the answer to your second question is easy: the default for graphical views is to show empty values ('NaN' means 'Not a Number' and treated as an empty value). You can change the setting by pressing the 'wrench' button of the view, the switch to the 'Row Hiding' panel and uncheck 'Show empty values'

I don't quite understand the first question. '0' is a number and a valid numerical result. If a calculation cannot be done. because an input value is not numerical or because of another error, you get NaN or Infinity. If you intentd to convert a '0' result into an empty cell, you could use the if(Wink function.
Re: Removing "NaN points" from graphs or formula to avoid "NaN" results [message #1742 is a reply to message #1737] Wed, 14 September 2022 08:29 Go to previous message
Charlene is currently offline  Charlene
Messages: 2
Registered: September 2022
Junior Member
Dear Thomas,
Thanks a lot! I did not know this possibility and I thought that NaN was considered as text!
It solved my problem, thank you very much Smile
Have a great day!
Charlène
Previous Topic: Metrics to use for UMAP analysis with SkelSpheres descriptor
Next Topic: Molecular Descriptors Tools (Free for non-commercial use)
Goto Forum:
  


Current Time: Fri Nov 22 10:08:11 CET 2024

Total time taken to generate the page: 0.03947 seconds