R group count [message #241] |
Sat, 11 March 2017 09:00 |
amorrison
Messages: 38 Registered: March 2016
|
Member |
|
|
Hi Thomas,
First of all let me say what a great bit of software to release for everyone to use.
My question relates to calculating the count of R-groups. I've found the frequency expression in the add calculate value drop down, but this only works by supplying an R-group to calculate for. Is it possible to calculate the frequency of all R-groups in a particular column which I can then use for filtering, e.g. remove all R-groups that only appear once.
Thanks,
Angus
|
|
|
Re: R group count [message #249 is a reply to message #241] |
Tue, 21 March 2017 21:17 |
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
|
|
|