Hi,

I'm looking to combine two data frames. Several of the columns are in common while the others need to be summed up. The apply functions and the merge functions don't seem to be working. I've included a basic example of what I'm trying to do below. Thanks!

Sean


data.frame1<-as.data.frame(matrix(c('winter','dredge','515',100,150),1,5))
names(data.frame1)<-c('Season','Gear','Area','COD','POLL')

data.frame2<-as.data.frame(matrix(c('winter','dredge','515',13,24,18),1,6))
names(data.frame2)<-c('Season','Gear','Area','COD','POLL','HAD')


I'd like to end up with something that looks like this:

Season   Gear   Area   COD   POLL   HAD
winter   dredge   515    113      174      18

Thanks,
Sean

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to