Learn R Programming

primate (version 0.2.0)

regroup.gnsp: 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

Run this code
# NOT RUN {

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')

# }

Run the code above in your browser using DataLab