Skip to content
Prev 136252 / 398498 Next

data frame question

On 10/02/2008, joseph <jdsandjd at yahoo.com> wrote:
Try this:   (avoiding underscores)

new.df <- merge(df1, df2, by=c('chrN','start'))
new.df$average.score <- apply(df3[,c('score.x','score.y')], 1, mean, na.rm=T)

As always, interested to see whether it can be done in one line...