Re: [R] combining elements in a data frame

2011-07-15 Thread Dennis Murphy
Hi: Q1: Try something like # Formula interface works for R-2.11.0 and later versions RTavg <- aggregate(RT ~ word, data = alldat, FUN = mean) merge(CCCW, RTavg, by.x = row.names(CCCW), by.y = 'word', all = TRUE) If the merge doesn't work (which is entirely possible), you might want to define a v

[R] combining elements in a data frame

2011-07-14 Thread Lee Averell
Hi all, I have 2 data frames the first contains a list with repeats of words and an associated response time (RT) measure for each word. The second is a tabulation of each unique word and other information such as the amount and of responses for each word. I need to determine the mean RT