regroup.gnsp {primate} | R Documentation |
Re-group data.frame by Genus_species
Description
Regroup a given data.frame by a column designated as unique genus_species combination. This function is essentially a wrapper for caroline:::groupBy()
Usage
regroup.gnsp(df,clmns,agg='mean',by='gn_sp')
Arguments
df |
a dataframe |
clmns |
columns |
agg |
type of aggregation to be used |
by |
the column name by which the data.frame should be re-grouped |
Value
returned value
Examples
primates.tab <- AWP.read.pkg.tab(tab.nm='dbo_tblGrovesMonkeys', id.clmn='MonkeyNumberGroves')
out <- regroup.gnsp(df=primates.tab,clmns=colnames(primates.tab), agg='paste')
[Package primate version 0.2.0 Index]