It\'s easy to grab one or more in ddply to process, but is there a way to grab the entire current row and pass that onto a function? Or to grab a set of columns determined at runtime?
I am trying to understand how to use the excellent plyr p开发者_如何转开发ackage\'s commands on a vector (in my case, of strings). I suppose I\'d want to use aaply, but it fails, asking for a margin.
I am dealing with a simple table of the form datevariablevalue 1970-01-01V10.434 1970-01-01V212.12 1970-01-01V3921.1
I have a data.frame named \"d\" of ~1,300,000 lines and 4 columns and another data.frame named \"gc\" of ~12,000 lines and 2 columns (but see the smaller example below).
I love the ability of plyr to split a data frame into multiple data sets and then perform identical operations on each set. The best part is when it shows you the result as a neat compact well labeled
I often need to apply a function to each pair of columns in a dataframe/matrix and return the results in a matrix. Now I always write a loop to do this. For instance, to make a matrix containing the p
I\'m trying to use the ddply method to take a dataframe with various info about 3000 movies and then calculate the mean gross of each genre. I\'m new to R, and I\'ve read all the questions on here rel
I have a long data frame with three columns fyear, tic, and dcvt (for fiscal year, ticker, and total convertible debt). There are about 18 fiscal years and a few thousand tickers. I would like to add
With some help, I figured out how to transform an edgelist, aka, an adjacency list into an adjacency matrix.I want to learn how to automate this for a large number of edgelists and then put the result
Suppose I wanted to get some summary statistics on the dataset mtcars (part of base R version 2.12.1).