similar to: Avoid duplication in dplyr::summarise

Displaying 20 results from an estimated 100 matches similar to: "Avoid duplication in dplyr::summarise"

2017 Sep 09
0
Avoid duplication in dplyr::summarise
Hi Lars I am not very sure what you really want. However, I am suggesting the following code that enables (1) to obtain the full summary of your data and (2) retrieve only mean of X values as function of factors f1 and f2. library(tidyverse) library(psych) df <- data.frame(matrix(rnorm(40), 10, 4), f1 = gl(3, 10, labels = letters[1:3]), f2 = gl(3, 10, labels
2017 Sep 09
1
Avoid duplication in dplyr::summarise
Hi Lars, Two comments: 1. You can achieve what you want with a slight modification of your definition of s(), using the hint from the error message that you need an argument '.': s <- function(.) { dplyr::summarise(., x1m = mean(X1), x2m = mean(X2), x3m = mean(X3), x4m = mean(X4)) } 2. You have not given a great test case in
2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
Hello all, I wrote a small function to add labels for outliers in a boxplot. This function will only work on a simple boxplot/formula command (e.g: something like boxplot(y~x)). Code + example follows in this e-mail. I'd be happy for any suggestions on how to improve this code, for example: - Handle boxplot.matrix (which shouldn't be too hard to do) - Handle cases of complex
2008 Sep 20
0
Error in GEE model fit
Hi, I would like to fit a GLM model with GEE on clustered data. I tried to use gee in the GEE package on a twin data set. All cluster are of size 2. I removed the missing data and ordered by IDENTIF2 first. library(gee) mod.pc <- gee(Y ~ X1 + X2 , id = IDENTIF2, family = binomial, corstr = "unstructured", data = na.omit(df)) gives the following result : Beginning Cgee S-function,
2005 Jul 13
3
samba-3.0.20pre2 rpms very BIG
Hi, I just downloaded the fedora samba-3.0.20pre2 source rpm. I built the binary RPM's using the rpmbuild -bb samba-spec command. I hav'nt installed the new rpm's yet but noticed they are much bigger than previous rpms. see below: -rw-r--r-- 1 root root 23M Jun 14 20:12 samba-3.0.14a-4.i386.rpm -rw-r--r-- 1 root root 25M Jun 30 19:04 samba-3.0.20pre1-1.i386.rpm -rw-r--r-- 1
2006 Feb 08
2
rotating axis / mtext labels
Hello list. Is it possible to use par(srt=45) to rotate text by 45 degrees along the x-axis of a plot. Using: <code> x_names<-c("C57 Nv", "C57 Vacc", "129 Nv", "129 Vacc", "IFNgR Nv", "IFNgR Vacc") par(srt=45) mtext(font=2, x_names, side=1, line=1, at=l, cex=1.2) par(srt=0) </code> doesn't seem to work in R 2.2.0
2009 Mar 15
0
How to summarise several models in a single table
Dear R-helpers, I have produced several models, named model1, model2, model3, etc... I would like to extract several elements from each model's object, e.g. at minimum the estimates, SEs, and P values of each model's intercept and slopes, model R-squared, and AIC... ...and then produce a new object (a table) that summarises all of my models, with M\models in rows and extractd model
2013 Jan 22
2
summarise subsets of a vector
Hello, I have vector called test. And now I wish to measure the mean of the first 10 number, the second 10 numbers etc How does it work? Thanks Wim > dput (test) c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.71, 0.21875, 0,
2004 Apr 06
1
Ignorant lack of bliss : summarise table by column attribute
Having read the list posting guidelines I fear my first post is about to break the rules. Apologies in advance. We have been asked to produce some graphs of relative performance of 3 groups of people in relation to the trend of their previous performance. I am neither a mathematician or a statistician, but wondered if R (which I have been using as a desktop calculator!) and some knowledge from
2006 Dec 01
0
SAGE Line 50
Hi everybody, I know this has been up on the list before since I've searched the archives. However I've been unsuccessful in trying to migrate from Win2k to Debian with SAGE. Can somebody who has a working setup please post the relevant parts of their smb.conf, these are from mine: netbios name = Spike workgroup = eh server string = hosts allow = 192.168.0.0/16 security = user encrypt
2011 Mar 27
6
Asking Favor For the Script of Median Filter
Hello,everybody. My name is Chuan Zun Liang. I come from Malaysia. I am just a beginner for R. Kindly to ask favor about median filter. The problem I facing as below: > x<-matrix(sample(1:30,25),5,5) > x [,1] [,2] [,3] [,4] [,5] [1,] 7 8 30 29 13 [2,] 4 6 12 5 9 [3,] 25 3 22 14 24 [4,] 2 15 26 23 19 [5,] 28 18 10 11 20 This
2009 Mar 30
2
HELP WITH SEM LIBRARY AND WITH THE MODEL'S SPECIFICATION
Dear users, i'm using the sem package in R, because i need to improve a confermative factor analisys. I have so many questions in my survey, and i suppose, for example, that Question 1 (Q1) Q2 and Q3 explain the same thing (factor F1), Q4,Q5 and Q6 explain F2 and Q7 and Q8 explain F3... For check that what i supposed is true, i run this code to see if the values of loadings are big or not.
2008 Jul 10
2
[PATCH] tripplite driver updates
The tripplite driver was developed on a machine with a reliable serial connection, and inherited the assumption that the serial line connection would not drop, reorder, or fail character read and writes. This patch adds significantly improved failure mode handling and also does basic checks of data validity. There's also a few minor cleanups/beautification. I've tested this code on my
2014 Jun 24
3
[PATCH 1/2] Drop dosutil/mdiskchk.com
A prebuilt binary. Needs non-free Watcom compiler to build. Signed-off-by: Lubomir Rintel <lkundrak at v3.sk> --- dosutil/mdiskchk.com | Bin 8106 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 dosutil/mdiskchk.com diff --git a/dosutil/mdiskchk.com b/dosutil/mdiskchk.com deleted file mode 100644 index
2011 Jan 24
1
How to measure/rank ?variable importance when using rpart?
--- included message ---- Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end ---- Consider the following printout from rpart summary(rpart(time ~ age + ph.ecog + pat.karno, data=lung)) Node number 1: 228 observations,
2007 Jan 04
3
problem with plot() and POSIXt dates
Hy all, I'm plotting graphs using plot() function, they are on X axes POSIX dates: "POSIXt" "oldClass" "POSIXct" "POSIXlt" I can't figure out why sometimes it prints the month and days and sometimes it prints the unix timestamp. It appens usually when the xlim is short like only some days. xlim is settled as a POSIXt like this "2006-12-30
2007 Aug 16
0
summarising systemfit with saveMemory
Hi all - I'm on R 2.5.1 for XP. in the systemfit package, the summary is set to print the McElroy's measure of fit unless it's NULL. When the option saveMemory = TRUE, the McElroy isn't included, instead it defaults to NA. Thus I am unable to use summary.systemfit. > library(systemfit) > example(systemfit) > surfit2 <-
2011 Apr 11
1
read in summarised data as table()
I have some summarised data from a 2D pivot table which I want to visualise in R. How can I read in the data as a R table so I can use mosaicplot()? Dirk -- View this message in context: http://r.789695.n4.nabble.com/read-in-summarised-data-as-table-tp3442283p3442283.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 28
5
Summarising Data for Forrest Plots
I tried to post this a few times last week and it seems to have got stuck somehow so I'm trying from a different email in the hope that works. If somehow this has appeared on the list 20 tiems and I never saw any of them I apologize ;-) I'm basically an R-newbie. But I am VERY computer literate. But this has me stumped... All the examples for using the rmeta package to create a
2009 Apr 01
0
回复: R-help Digest, Vol 73, Issue 32
Dear sir,    How to do bilinear time series in R?Is there any functions or packages?  thank you! -----Sincerely yours Kuangnan Fang 方匡南 敬上 department of statistics ,Economics school,Xia men University. Fujian Province (361005) China Mobile Phone:15860721915 SKYPE: ruiqwy MSN Messenger: ruiqwy@hotmail.com QQ:39863401 --- 09年3月31日,周二, r-help-request@r-project.org