Displaying 1 result from an estimated 1 matches for "total_hook_num".
2009 Oct 12
1
Binding objects with a similar name
Dear R users,
The code below splits a dataset by "target_species" and then further splits
each target species group by year. Finally the sum of a variable called
"total_hook_num" is calculated and then assigned a name based on
(paste(a$target_species[1],a$year[1],sep="").
newsplit<-split(newdataset,list(newdataset$target_species))
for(i in newsplit){
by.year<-split(i,list(i$year))
for(a in by.year){
assign(paste(a$target_species[1],a$year[1],sep=&q...