Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread Ulrik Stervbo
Yes. But in the sample code the data is summarised. In which case you get 4 rows and not the correct 32. On Tue, 5 Jul 2016, 07:48 David Winsemius, wrote: > nrow(mtcars) > > > Sent from my iPhone > > On Jul 4, 2016, at 9:03 PM, Ulrik Stervbo wrote: > > That will give you the wrong result when u

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread David Winsemius
nrow(mtcars) Sent from my iPhone > On Jul 4, 2016, at 9:03 PM, Ulrik Stervbo wrote: > > That will give you the wrong result when used on summarised data > > > David Winsemius schrieb am Di., 5. Juli 2016 02:10: >> I thought there was an nrow() function? >> >> Sent from my iPhone >> >>> On

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread Ulrik Stervbo
That will give you the wrong result when used on summarised data David Winsemius schrieb am Di., 5. Juli 2016 02:10: > I thought there was an nrow() function? > > Sent from my iPhone > > On Jul 4, 2016, at 9:59 AM, Ulrik Stervbo wrote: > > If you want the total number of rows in the original da

Re: [R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Duncan Murdoch
On 04/07/2016 7:42 AM, Christian Hoffmann wrote: Hi, I have a *.Rnw which I can Sweave with no problem, but which cannot be processed by R CMD Rd2pdf --no-clean --force. That's not the command you're using. (It would give a "no inputs" error, not a vignette error. If you actually gave the

Re: [R] Problem with utils package

2016-07-04 Thread Duncan Murdoch
On 04/07/2016 5:36 AM, juansantomero7432--- via R-help wrote: Dear List, I am having the following problem. I just installed a new version of R on Ubuntu Trust LTS, following instruction on CRAN website, but the associated utils package which got installed appears only as version 3.0.2. How a

Re: [R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Rolf Turner
Perhaps this is just my ignorance speaking, but it seems counterintuitive to me to try to process a *.Rnw file by means of Rd2pdf which would appear to be designed to process *.Rd files. I would have thought that "R CMD Sweave ..." would be the appropriate call. I find that R CMD Swe

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread David Winsemius
I thought there was an nrow() function? Sent from my iPhone > On Jul 4, 2016, at 9:59 AM, Ulrik Stervbo wrote: > > If you want the total number of rows in the original data.frame after > counting the rows in each group, you can ungroup and sum the row counts, like: > > library("dplyr") > >

[R] GAMS, std errors and confidence intervals

2016-07-04 Thread Dan Jaffe
Can anyone help me calculating CIs from a GAM analysis? I have calculated a GAM fit (m3) and the associated std errors using predict.gam I assume that the 95% CI around each fit value would be 1.96 times the se.But when I do this both on the original and a test dataset, I find the CI's only en

[R] FW: How to read multiple raster and serial correlation between series of rasters

2016-07-04 Thread Waseem Ali
I have asked the below mentioned question a month before. Please guide me if the question is not properly asked to the list member. Waseem Ali From: w1ma...@gmail.com To: r-help@r-project.org Subject: FW: How to read multiple raster and serial correlation between series of rasters Date: Thu,

Re: [R] lineplot.CI xaxis scale change in sciplot?

2016-07-04 Thread Clemence Henry
Hi, I used the "axis()" suggested by Jim as follows and it worked: #Plots average A/Ci for each day from ACi #Parameters of the panels par(mfcol=c(3,2), #row,col mar=c(2,2,1,1), #inner margin (bottom, left, top, right) oma=c(4,4,1,1), #outer margin (bottom, left, top, right) omd=c(0.1

[R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Christian Hoffmann
Hi, I have a *.Rnw which I can Sweave with no problem, but which cannot be processed by R CMD Rd2pdf --no-clean --force. Th latter stops with creating vignettes ... ERROR Error: processing vignette 'cwhmisc.Rnw' failed with diagnostics: at cwhmisc.Rnw:31, could not find function "cformat" E

[R] R-3.3.1 RPM release

2016-07-04 Thread Sangalli Cristiano Giovanni (Ext. - UniCredit Business Integrated Solutions)
Dear CRAN, I have installed on a RHEL 5.7 server the recent R-3.3.0 rpm but I would like to upgrade to the latest now available R-3.3.1 . I have not found so far the rpm, I would like to know if and when it will be available? Thanks in advance, Cris This e-mail is confidential and may also co

[R] Problem with utils package

2016-07-04 Thread juansantomero7432--- via R-help
Dear List, I am having the following problem.  I just installed a new version of R on Ubuntu Trust LTS, following instruction on CRAN website, but the associated utils package which got installed appears only as version 3.0.2. On an older version of R (3.1.2) which I am running on a Windows machi

Re: [R] Problem with utils package

2016-07-04 Thread juansantomero7432--- via R-help
Dear List, This is an update to the query I sent earlier: I am having the following problem.  I just installed a new version of R (3.3.1) on Ubuntu Trusty LTS, following instruction on CRAN website, but the associated packages which are installed as part of the base package (e.g. utils) get inst

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread maicel
Thank you!!! It's what I needed. best regard Maicel Monzon, PHD Centro Nacional de Ensayos Clinicos Ulrik Stervbo escribió: If you want the total number of rows in the original data.frame after counting the rows in each group, you can ungroup and sum the row counts, like: library("dplyr")

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread Ulrik Stervbo
If you want the total number of rows in the original data.frame after counting the rows in each group, you can ungroup and sum the row counts, like: library("dplyr") mtcars %>% group_by (am, gear) %>% summarise (n=n()) %>% mutate(rel.freq = paste0(round(100 * n/sum(n), 0), "%")) %>%

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread David Winsemius
> On Jul 4, 2016, at 6:56 AM, mai...@infomed.sld.cu wrote: > > Hello, > How can I aggregate row total for all groups in dplyr summarise ? Row total … of what? Aggregate … how? What is the desired answer? > library(dplyr) > mtcars %>% > group_by (am, gear) %>% > summarise (n=n()) %>% > muta

Re: [R] lineplot.CI xaxis scale change in sciplot?

2016-07-04 Thread David Winsemius
> On Jun 29, 2016, at 7:04 PM, Clemence Henry > wrote: > > Hi, > > I am trying to change the values of the tick marks on the xaxis of the > following multipanel plot (see relevant bits of script below) to increments > of 50 or to a custom scale (ie. 50, 100, 150, 200, 300...). > So far I tri

[R] Antwort: Re: Dump of new Methods (SOLVED)

2016-07-04 Thread G . Maubach
Hi Bert, many thanks. Found them. Kind regards Georg Von:Bert Gunter An: g.maub...@weinwolf.de, Datum: 04.07.2016 16:43 Betreff:Re: [R] Dump of new Methods ?getwd Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and st

[R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread maicel
Hello, How can I aggregate row total for all groups in dplyr summarise ? library(dplyr) mtcars %>% group_by (am, gear) %>% summarise (n=n()) %>% mutate(rel.freq = paste0(round(100 * n/sum(n), 0), "%")) best regard Maicel Monzon

Re: [R] Extracting matrix from netCDF file using ncdf4 package

2016-07-04 Thread Hemant Chowdhary via R-help
Thank you Bert. Yes, your suggestion is correct and there is no need to pre-define the matrix and the sapply function works quite fast. This resolves my issue. Thank you both againHC On Sunday, 3 July 2016 11:38 AM, Bert Gunter wrote: Well, yes, ... but no: there is no need to pre-defin

[R] Dump of new Methods

2016-07-04 Thread G . Maubach
Dear Readers, Hi All, to drive my R knowlegde a bit further I followed the advice of some of you by reading Chambers: Programming with data. I tried some examples from the book: -- cut -- setClass("track", representation (x = "numeric", y = "numeric")) trac

Re: [R] Comparing two diagnostic tests with lme4

2016-07-04 Thread Michael Dewey
Dear Keno I am not sure from your description what your scientific question is but if you want to bring together a number of diagnostic test results and then see the influence of moderator variables you might want to investigate packages directed at meta-analysis. I have used mada but there a