search for: d_ply

Displaying 14 results from an estimated 14 matches for "d_ply".

Did you mean: l_ply
2010 Jan 29
1
SemiPar/spm question
...would appreciate any help. Thanks. ========================================================== library(plyr) library(SemiPar) data <- data.frame(id=c(rep("111",100),rep("222",200)), value=c(rnorm(100,2,1),rnorm(200,10,5)), lhs=c(rnorm(100,2,1),rnorm(200,10,5))) #this works d_ply(data, c("id"), function(x) { print(lm("lhs~value", data=x)) }) #this works data111 <- data[data$id=="111",] print(spm(data111$value ~ f(1:nrow(data111)))) #this does not work d_ply(data, c("id"), function(x) { print(spmx <- spm(x$value ~ f(1:n...
2008 Sep 30
0
New package: plyr
...choice of passing chunks as rows or as variables plyr functions are named according to the type of object they input (first letter) and output (second letter): * llply = from a list to a list * alply = from an array (or vector, or matrix) to a list * ldply = from a list to a data.frame * d_ply = from a data.frame, ignore output * and so on for llply, laply, ldply, l_ply, alply, aaply, adply, a_ply, dlply, daply, dply, d_ply plyr also provides: * m*ply which works in a similar way to mapply * r*ply which works in a similar way to replicate You can find out more at http://had.co.n...
2008 Sep 30
0
New package: plyr
...choice of passing chunks as rows or as variables plyr functions are named according to the type of object they input (first letter) and output (second letter): * llply = from a list to a list * alply = from an array (or vector, or matrix) to a list * ldply = from a list to a data.frame * d_ply = from a data.frame, ignore output * and so on for llply, laply, ldply, l_ply, alply, aaply, adply, a_ply, dlply, daply, dply, d_ply plyr also provides: * m*ply which works in a similar way to mapply * r*ply which works in a similar way to replicate You can find out more at http://had.co.n...
2011 Aug 05
2
Aggregating data
I aggregated my data: aggresults <-aggregate(results, by=list(results$a, results$b, results$c), FUN=mean, na.rm=TRUE) results has about 8000 lines of data, and aggresults has about 80 lines. I would like to create a separate variable for each of the 80 aggregates, each containing the 100 lines that were aggregated. I would also like to create plots for each of those 80 datasets. Is
2011 Feb 21
3
multiple plots using a loop
Dear R users, I am trying to write myself a loop in order to produce a set of 20 length frequency plots each pertaining to a factor level. I would like each of these plots to be available on the same figure, so I have used par(mfrow = c(4, 5)). However, when I run my loop below, it produces 20 plots for each factor level and only displays the last factor levels LF plots. I'm fairly new to
2011 Mar 14
1
Multiple graphs
...2, col.main= "black", cex.sub = 1, font.sub = 2, col.sub ="black") par(xaxt="s") axis(1,at=1:length(unique(output$internal_scale_id)), labels = internal_scale) box(which="outer",bty = "o", col = "#804000") dev.off() } d_ply(output, .(basel_asset_class_id), DP_graphs) [[alternative HTML version deleted]]
2011 Mar 08
2
How to plot multiple graphs?
Dear R helpers, I have following data.frame giving asset class (i.e. bank, corporate, sovereign etc. as there could be number of classes) and rating-wise default frequency. I need to plot graphs for each of these classes i.e. bank, corporate and sovereign where I will be plotting ratings (AAA, AA, etc) on the x-axis and their respective default probabilities on Y-axis. I have tried to write a
2012 Jun 25
3
Loop for multiple plots in figure
Hello, I have longitudinal data of the form below from N subjects; I am trying to create figure with N small subplots on a single page, in which each plot is from only one subject, and in each plot there is a separate curve for each value of param1. So in this case, there would be four plots on the page (one each for Bob, Steve, Kevin and Dave), and each plot would have two separate curves (one
2012 Jan 12
1
parallel computation in plyr 1.7
...arding the possibility of parallel computation in plyr version 1.7. The help files of the following functions mention the argument '.parallel': ddply, aaply, llply, daply, adply, dlply, alply, ldply, laply However, the help files of the following functions do not mention this argument: ?d_ply, ?aply, ?lply Is it because parallel computation is not supported for these latter functions? Or is it just because the documentation was not updated for these functions after adding the parallel computation feature? Thanks for help! Greetz, Adi p.s. awesome work, that package plyr! [[alterna...
2009 Apr 15
0
plyr version 0.1.7
...ectors * ddply: first variable now varies slowest as you'd expect plyr 0.1.5 (2008-02-23) --------------------------------------------------- * colwise now accepts a quoted list as its second argument. This allows you to specify the names of columns to work on: colwise(mean, .(lat, long)) * d_ply and a_ply now correctly pass ... to the function -- http://had.co.nz/ _______________________________________________ R-packages mailing list R-packages at r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages
2009 Apr 15
0
plyr version 0.1.7
...ectors * ddply: first variable now varies slowest as you'd expect plyr 0.1.5 (2008-02-23) --------------------------------------------------- * colwise now accepts a quoted list as its second argument. This allows you to specify the names of columns to work on: colwise(mean, .(lat, long)) * d_ply and a_ply now correctly pass ... to the function -- http://had.co.nz/ _______________________________________________ R-packages mailing list R-packages at r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages
2009 Nov 19
4
Is there an variant of apply() that does not return anything?
There are a few version of apply() (e.g., lapply(), sapply()). I'm wondering if there is one that does not return anything but just silently apply a function to the list argument. For example, the plot function is applied to each element in 'alist'. It is redundant to return anything from apply. apply(alist,function(x){ plot each element of alist})
2011 Nov 05
2
Doing dist on separate objects in a text file
So I have a text file that looks like this: "Label" "X" "Y" "Slice" 1 "Field_1_R3D_D3D_PRJ_w617.tif" 348 506 1 2 "Field_1_R3D_D3D_PRJ_w617.tif" 359 505 1 3 "Field_1_R3D_D3D_PRJ_w617.tif" 356 524 1 4 "Field_1_R3D_D3D_PRJ_w617.tif" 2 0 1 5 "Field_1_R3D_D3D_PRJ_w617.tif" 412 872 1 6
2011 Aug 10
1
Sequential Naming of ggplot .pngs using plyr
If I have data: dat<-data.frame(a=rnorm(20),b=rnorm(20),c=rnorm(20),d=rnorm(20),site=rep(letters[5:8],each=5)) And want to plot like this: ctr<-1 for(i in c('a','b','c','d')){ png(file=paste('/tmp/plot_number_',ctr,'.png',sep=''),height=8.5, width=11,units='in',pointsize=9,res=300) print(ggplot(dat[,names(dat) %in%