You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are certain circumstances where the automated substitutions code (process.R, line 971) currently requires long lists of substitutions - but maybe could be refined...
Since it only matches entire strings, in circumstances where there are multiple categorical values, one of which needs to be changed, each circumstance with a change to that term needs to be included. For instance, in order to change procumbent to prostrate, there are only 6 times you'd have to replace the term through some variant of str_replace, but 97 different substitutions you'd have to add.
This gets even harder to fix when the words are entered into the data.csv file in non-alphabetical order, because the output is alphabetical and it is tedious to look up each term in the data.csv file to figure out why the substitution isn't "working".
Could the code be rewritten to replace all instances of a term, rather than an exact string match?
(I also occasionally struggle with capital letters in the input causing substitutions to fail, but this shouldn't be a problem, should it?)
The text was updated successfully, but these errors were encountered:
Yes, and this would be good to fix. We tend to resort to using str_replace in custom_R_code to avoid the endless substitutions, which isn't ideal, because it is hiding the substitutions in a sense.
There are certain circumstances where the automated substitutions code (process.R, line 971) currently requires long lists of substitutions - but maybe could be refined...
Since it only matches entire strings, in circumstances where there are multiple categorical values, one of which needs to be changed, each circumstance with a change to that term needs to be included. For instance, in order to change
procumbent
toprostrate
, there are only 6 times you'd have to replace the term through some variant ofstr_replace
, but 97 different substitutions you'd have to add.From growth_form branch:
This gets even harder to fix when the words are entered into the data.csv file in non-alphabetical order, because the output is alphabetical and it is tedious to look up each term in the data.csv file to figure out why the substitution isn't "working".
Could the code be rewritten to replace all instances of a term, rather than an exact string match?
(I also occasionally struggle with capital letters in the input causing substitutions to fail, but this shouldn't be a problem, should it?)
The text was updated successfully, but these errors were encountered: