Displaying 20 results from an estimated 100 matches similar to: "do I need plyr, apply or something else?"
2015 Jul 11
1
User Input
All,
I have a package BondLab, all variables are passed to the models via Cusip objects. ?
The only variables input by the user are?
settlement date,?
price or yield or spread. ?
Further price may be passed as 100.125, 100-8 (1/8), or 100-2 (2/64) or 100-2+ (5/128).?
Once passed these variables must have a steady state (in decimal). ?After reading the R documentation and Hadley's book I
2013 Aug 27
1
[plyr] Moving average filter with plyr
Dear all,
I'm stuck with a problem using plyr to process a rather large junk of data. What I'm trying to do is applying a moving average to all the subparts of the dataframe (the example data can be found here https://dl.dropboxusercontent.com/u/2414056/testData.Rdata).
require(plyr)
load("testData.Rdata")
applyfilter<-function(x){
return(filter(x,rep(1/5, times=5)))
}
2011 Jul 30
0
plyr version 1.6
# plyr
plyr is a set of tools for a common set of problems: you need to
__split__ up a big data structure into homogeneous pieces, __apply__ a
function to each piece and then __combine__ all the results back
together. For example, you might want to:
* fit the same model each patient subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise
2011 Jul 30
0
plyr version 1.6
# plyr
plyr is a set of tools for a common set of problems: you need to
__split__ up a big data structure into homogeneous pieces, __apply__ a
function to each piece and then __combine__ all the results back
together. For example, you might want to:
* fit the same model each patient subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise
2013 Feb 01
0
R code parallelized using plyr and doMC: error message: Error in do.ply(i) : task 1 failed - “could not find function ”getClass“”
Dear list,
I'm just getting started learning how to use remote supercomputers for
execution of parallelized code. I got a lot of initial help from this
<http://stackoverflow.com/questions/14553357/parallelizing-on-a-supercomputer-and-then-combining-the-parallel-results-r>
previous post, as well as one particularly helpful and patient XSEDE guy.
I'm only using one node (for the
2010 Aug 09
2
coef(summary) and plyr
Dear all,
I?m having trouble getting a list of regression variables back into a dataframe.
mydf <- data.frame(x1=rnorm(100), x2=rnorm(100), x3=rnorm(100))
mydf$fac<-factor(sample((0:2),replace=T,100))
mydf$y<- mydf$x1+0.01+mydf$x2*3-mydf$x3*19+rnorm(100)
dlply(mydf,.(fac),function(df) lm(y~x1+x2+x3,data=df))->dl
here I?d like to use
ldply(dl,coef(summary)) or something
2011 Apr 23
0
MASS fitdistr call in plyr help!
I have a set of wind speeds read at different locations. The data is
a data frame with two columns: site and wind speed. I want to split
the data on site and call a function to find the shape and scale
parameters of a weibull distribution fit.
The end result is a plot with x-axis = shape and y-axis = scale.
Currently my code looks like:
fit_wind_speed<-function(x){
2013 Apr 23
0
Fw: Error with function - USING library(plyr)
Dear R forum,
Please refer to my query regarding "Error with function". I forgot to mention that I am using "plyr" library.
Sorry for inconvenience.
Regards
Katherine
--- On Tue, 23/4/13, Katherine Gobin <katherine_gobin@yahoo.com> wrote:
From: Katherine Gobin <katherine_gobin@yahoo.com>
Subject: [R] Error with function
To: r-help@r-project.org
Date:
2010 Mar 28
2
installing package reshape and plyr on Debian Lenny
Hi all,
has anyone tried and possibly succeeded in installing "reshape" package on Debian Lenny? I have a permanent failure because i cannot find the "plyr" package. I tried 10 mirrors. I contacted Hadley Wickham and James Long who seemed to have been closed to do it but it didn't work (meaning so far I haven't the answer from them). So has anyone any ideas as how to
2008 Sep 30
0
New package: plyr
plyr is a set of tools that solves a common set of problems: you need
to break a big problem down into manageable pieces, operate on each
pieces and then put all the pieces back together. It's already
possible to do this with split and the apply functions, but plyr just
makes it all a bit easier with:
* consistent names, arguments and outputs
* input from and output to data.frames,
2008 Sep 30
0
New package: plyr
plyr is a set of tools that solves a common set of problems: you need
to break a big problem down into manageable pieces, operate on each
pieces and then put all the pieces back together. It's already
possible to do this with split and the apply functions, but plyr just
makes it all a bit easier with:
* consistent names, arguments and outputs
* input from and output to data.frames,
2008 Oct 05
1
plyr package: passing further arguments fail
Dear list and Hadley,
The new plyr package seems to provide a clean and consistent way to apply a function on several arguments. However, I don't understand why the following example does not work like the standard mapply,
library(plyr)
df <- data.frame(a=1:10 , b=1:10)
foo1 <- function(a, b, cc=0, d=0){
a + b + cc + d
}
mdply(df, foo1, cc=1) # fine
mdply(df, foo1, d=1) #
2009 Jun 23
0
plyr 0.1.9
plyr is a set of tools for a common set of problems: you need to break
down a big data structure into manageable pieces, operate on each
piece and then put all the pieces back together. For example, you
might want to:
* fit the same model to subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise transformations like scaling or standardising
*
2009 Jun 23
0
plyr 0.1.9
plyr is a set of tools for a common set of problems: you need to break
down a big data structure into manageable pieces, operate on each
piece and then put all the pieces back together. For example, you
might want to:
* fit the same model to subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise transformations like scaling or standardising
*
2010 Jul 27
0
plyr version 1.1
plyr is a set of tools for a common set of problems: you need to break
down a big data structure into manageable pieces, operate on each
piece and then put all the pieces back together. For example, you
might want to:
* fit the same model to subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise transformations like scaling or standardising
2010 Jul 27
0
plyr version 1.1
plyr is a set of tools for a common set of problems: you need to break
down a big data structure into manageable pieces, operate on each
piece and then put all the pieces back together. For example, you
might want to:
* fit the same model to subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise transformations like scaling or standardising
2011 Apr 07
1
plyr workaround to converting by() to a data frame
Dear all
Is there a clean plyr version of the following by() and do.call(rbind,
...) construct:
> df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y"))
> dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp3")], range)
>
2011 Jun 03
0
ragged data.frame? using plyr
I have a dataset that looks like:
set.seed(144)
sam<-sample(1000,100)
dat<-data.frame(id=letters[1:10],value=rnorm(1000),day=c(rep(1,100),rep(2,100),rep(3,100),rep(4,100),rep(5,100)))
I want to "normalise" it using the following function (unless you have
a better idea...):
adj.values<-function(dframe){
value_mean<-mean(dframe$value)
value_sd<-sd(dframe$value)
2011 Nov 13
1
New PLYR issue
Issue with PLYR.
Now using R 2.14 and this data and plyr command line worked with 2.13
I am also loading the same saved data that worked previously, but now
some issue.
> library(plyr)
> UNESCO <- dget('C:/Carbon-GJ/BZE_ecosys.robj')
> df2 <- ddply(df, "UNESCO", summarise, total_ha = sum(Ha))
*Error in if (empty(.data)) return(.data) :
missing value where
2011 Dec 30
0
Plyr 1.7
# plyr
plyr is a set of tools for a common set of problems: you need to
__split__ up a big data structure into homogeneous pieces, __apply__ a
function to each piece and then __combine__ all the results back
together. For example, you might want to:
* fit the same model each patient subsets of a data frame
* quickly calculate summary statistics for each group
* perform group-wise