search for: gapply

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

Did you mean: apply
2004 Mar 03
1
Calculating percentiles from Grouped Data (gapply)
Dear R-list, I try to calculate the 10- and 90-Percentile from grouped data. Using 'lappy' it works fine but I have no success with 'gapply': df <- data.frame(test = runif(100)) df <- df[order(df[,1]),] z <- rep(1:10, each = 10) lapply(split(df, z), function(x) quantile(x, probs=c(10,90)/100)) library(nlme) gapply(as.data.frame(df), which=1, function(x) quantile(x, probs=c(10,90)/100), group=z) # Error in so...
2011 Apr 29
1
Analysis and graphics by groups
...of data. Right now what I'm trying to do is to fit and plot the following logistic model, according to a third variable named "Cerca": dm_fit_T<-nls(nDMTRBgm2~(K/(1+((K-nDMTRBgm2.T.1)/nDMTRBgm2.T.1)*exp(-r))),perieph,start=list(K=3,r=0.2),trace=T) I've found a function called gapply which seems to be what I need, but it doesn't seem to work. This is the argument I've used: gapply(perieph,FUN=nls(nDMTRBgm2~(K/(1+((K-nDMTRBgm2.T.1)/nDMTRBgm2.T.1)*exp(-r))),perieph,start=list(K=3,r=0.2),trace=T),groups="Cerca") But I get this error message returned: > Error...
2009 May 15
0
Ego net and merge networkss
...blem: I have a network object and calculated the degree centrality (freeman) for all vertexes. Now I select the first 5 vertexes with the highest degree centrality to take a closer look at their ego networks. For the ego network analysis I tried and tried for 3 day with ego.extract, sapply and gapply but I couldn`t do it. My question: I want to look at the development of the relation between the number of egos related to the number of alters they reach with directly. Let's say with one ego (the vertex with the highest degree centrality) I reach 15 alters in my network. Now I want to com...
2003 Sep 29
4
Data frame transpose
Hi All, I want to ask if there is a transpose function for data frame like the procedure of transpose in SAS? Because I want to partially transpose a data frame which contains 5 columns (siteid, date, time, obs, mod), what I want to do is to put time as the column variables along with siteid, and date, and put obs and mod in the row names. specifically to transpose a data frame: siteid date