plyr
On using plyr and ldply
I have a reoccuring problem - I apologize! Say I want to have the baseball data (from the plyr package) listed according to \'id\' and \'year\'. There is a difference between creating the list accord[详细]
2023-04-13 06:17 分类:问答How can I efficiently use R to add summary rows with 0 cases?
I have a data set that includes cases by year and month.Some months are missing, and I\'d like to create rows with a case count of zero for those months.[详细]
2023-04-12 12:32 分类:问答Grouping on multiple variables in R
I\'m a power excel pivot table user who is forcing himself to learn R.I know exactly how to do this analysis in excel, but can\'t figure out the right way to code this in R.[详细]
2023-04-11 15:06 分类:问答Mean of elements in a list of data.frames
Suppose I had a list of data.frames (of equal rows and columns) dat1 <- as.data.frame(matrix(rnorm(25), ncol=5))[详细]
2023-04-10 21:31 分类:问答Allowing WMA (from TTR package) to return original value when fewer than N points
When running the following: wavData = ddply(wavData, c(\"primary\", \"int开发者_运维百科erference\", \"label\"), transform,[详细]
2023-04-09 12:34 分类:问答Question regarding llply or lapply - applying functions to data.frames in a list
Dear R user community, I have many data.frames in a list, as follows (only one data.frame in the list of 21 shown for convenience):[详细]
2023-04-08 19:46 分类:问答Combining split() and cumsum()
I am trying to produce stats for cumulative goals by season by a particular soccer player. I have used the cut function to obtain the season from the game dates. I have data which corresponds to this[详细]
2023-04-05 04:14 分类:问答Dividing specific values between two arrays
I am a novice R user trying to work with a data set of 40,000 rows and 300 columns.I have found a solution for what I would like to do, however my machine takes over an hour to run my code and I feel[详细]
2023-04-04 22:20 分类:问答Using Plyr in R with a complex function that returns multiple variable
I have a data set with three grouping variables: condition, sub, & delay. Here is a simplified version of my data (real data is much longer)[详细]
2023-04-03 22:29 分类:问答R - ddply and incrementing a counter
I am using ddply to split up a data frame and send the chunks to a function. Before the ddply line, I set i=1. Then inside the functi开发者_运维问答on I am incrementing i so that each chunk of data ge[详细]
2023-04-03 19:49 分类:问答