openmolecules.org

 
Home » DataWarrior » Functionality » R group count
Re: R group count [message #249 is a reply to message #241] Tue, 21 March 2017 21:17 Go to previous message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Hi Angus, if I understand correctly you could actually use the frequency function: frequency(value, column-name)

If you have a column called 'R-Group', then the two parameters passed to the function are:
frequency(rGroup, "R-Group")

The first parameter is the variable name that refers to the actual R-group in the respective row, while the second
is the column in which this R-Group's occurence is counted. If you for instance have a column that contains 'methyl'
five times and 'ethyl' two times, the a new column is created that has a '5' in every 'methy' row and a '2' in every
row of which the R-group is 'ethyl'.

The trick is to pass a variable as the first parameter and not a static value.

Does this answer your question?

Thomas
 
Read Message
Read Message
Previous Topic: Option to hyperlink data.
Next Topic: Compound selection via check box
Goto Forum:
  


Current Time: Mon Nov 25 21:04:50 CET 2024

Total time taken to generate the page: 0.03610 seconds