search for: acdelr

Displaying 4 results from an estimated 4 matches for "acdelr".

Did you mean: acdelre
2011 Sep 25
4
selecting first row of a variable with long-format data
Hi, I am trying to select the first row of a variable with data in long-format, e.g., # sample data id <- c(1,1,1,2,2) value <- c(5,6,7,4,5) dat <- data.frame(id, value) dat How can I select/subset the first 'value' for each unique 'id'? Thanks, AC [[alternative HTML version deleted]]
2010 Jan 28
2
Data.frame manipulation
Hi All, I'm conducting a meta-analysis and have taken a data.frame with multiple rows per study (for each effect size) and performed a weighted average of effect size for each study. This results in a reduced # of rows. I am particularly interested in simply reducing the additional variables in the data.frame to the first row of the corresponding id variable. For example:
2010 Feb 20
3
aggregating using 'with' function
Hi All, I am interested in aggregating a data frame based on 2 categories--mean effect size (r) for each 'id's' 'mod1'. The 'with' function works well when aggregating on one category (e.g., based on 'id' below) but doesnt work if I try 2 categories. How can this be accomplished? # sample data id<-c(1,1,1,rep(4:12)) n<-c(10,20,13,22,28,12,12,36,19,12,
2012 Jul 25
1
reshaping data
Hi, I am trying to reshape data from a long to wide format but have a specific task that I cannot get to output properly. # SAMPLE DATA; id <- c(1,2,2,3,3,3) time <-c(0,0,5, 0, 2, 10) x <- rnorm(length(id)) long <- data.frame(id,time,x) # To reshape, I would like to exclude 'id' values that have NO duplicate (i.e., remove # id=1 in this case). My attempts failed because the