Currently, obs just returns indexes of observations for each taxon. Most of the time that is used to look up some set of values for each taxon, so it would be nice if obs could return that directly.
What had to be done this way:
vapply(obs(data, "my_table"), # For each taxon...
function(index) sum(data$obs_data[index, id]), numeric(1)) # sum the proportions
Currently,
obs
just returns indexes of observations for each taxon. Most of the time that is used to look up some set of values for each taxon, so it would be nice ifobs
could return that directly.What had to be done this way:
Could be done this way: