Re: [R] aov and Error function

2015-02-01 Thread Rolf Turner
On 01/02/15 02:17, John Sorkin wrote: I am trying to understand the Error function and its use in ANOVA. In particular I want to understand the difference between two models that differ only with respect to the Error statement: aovsubj - aov(value~group+time+Error(subject),data=dataRMANOVA)

Re: [R] Melt and Rbind/Rbindlist

2015-02-01 Thread Shouro Dasgupta
Hello Mr. Holtman, Thank you very much for your reply and suggestion. This is what each Year's data looks like; tmp1 - structure(list(FIPS = c(1001L, 1003L, 1005L), X2026.01.01.1 = c(285.5533142, 285.5533142, 286.2481079), X2026.01.01.2 = c(283.4977112, 283.4977112, 285.0860291),

[R] Regression Overdispersion?

2015-02-01 Thread JvanDyne
I am trying to use Poisson regression to model count data with four explanatory variables: ratio, ordinal, nominal and dichotomous – x1, x2, x3 and x4. After playing around with the input for a bit, I have formed – what I believe is – a series of badly fitting models probably due to overdispersion

[R] How to enable https for R 3.1.2 on windows 8.1

2015-02-01 Thread John Kalb
I run the code below successfully on Mac and Ubuntu successfully. When I run on Windows, I get the results shown. How do I get the code to work on Windows? I've googled extensively with no success. Thanks in advance. require(twitteR) Loading required package: twitteR Loading required package:

Re: [R] How to enable https for R 3.1.2 on windows 8.1

2015-02-01 Thread Jeff Newmiller
Honestly? Did you try rcurl https windows (without the quotes)? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

Re: [R] Is there a way to map data from Binary format to Numerical numbers?

2015-02-01 Thread arun
Try indx - which(!!mat, arr.ind=TRUE) v1 -unname(sapply(split(indx[,2], indx[,1]),toString)) cat(paste(v1, collapse=\n), sep=\n) 1, 2, 3, 6, 7, 8, 9 1, 2, 3, 6, 8, 9 1, 3, 4, 6, 7, 8, 9 1, 8 1, 3, 6, 7, 8, 9 1, 3, 4, 6, 8, 9 1, 3, 5, 9 A.K. Hi, Is there a way to map data from Binary

[R] Transform a list of multiple to a data.frame which I want

2015-02-01 Thread Yao He
Dear all: I have a list like that,which is a standard str_locate_all() function (stringr package) output: $K start end $GSEGTCSCSSK start end [1,] 6 6 [2,] 8 8 $GFSTTCPAHVDDLTPEQVLDGDVNELMDVVLHHVPEAK start end [1,] 6 6 $LVECIGQELIFLLPNK start end [1,] 4

Re: [R] Regression Overdispersion?

2015-02-01 Thread David Barron
There are two straightforward ways of modelling overdispersion: 1) Use glm as in your example but specify family=quasipoisson. 2) Use glm.nb in the MASS package, which fits a negative binomial model. On 1 February 2015 at 16:26, JvanDyne e283...@trbvm.com wrote: I am trying to use Poisson

[R] save program results and graphs to one file

2015-02-01 Thread Ragia Ibrahim
Dear group, I have many plots and numeric results in my R program, kindly how can I save them all sequently on one file. thanks in advance RAI [[alternative HTML version deleted]] __

Re: [R] Regression Overdispersion?

2015-02-01 Thread Rune Haubo
A third, and often preferable, way is to add an observation-level random effect: library(lme4) data1$obs - factor(seq_len(nrow(data1))) model - glmer(y ~ x1 + x2 + (1 | obs), family=poisson(link=log), data=data1) See http://glmm.wikidot.com/faq and search for individual-level random effects.

Re: [R] save program results and graphs to one file

2015-02-01 Thread Bert Gunter
But in addition to what Jeff noted, see ?save and ?save.image (noting that that the resulting .Rdata file can only be read by R). Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not

Re: [R] save program results and graphs to one file

2015-02-01 Thread Henrik Bengtsson
If you're happy with outputting to a multi-page PDF, then you can just set the default graphics device to pdf(), i.e. options(device=pdf) and the start plotting: plot(1:10, col=0) plot(10:1, col=1) plot((1:10)^2, col=2) plot((10:1)^2, col=3) and at the end make sure to close the device:

Re: [R] save program results and graphs to one file

2015-02-01 Thread Jeff Newmiller
In general this depends what you plan to do with those results. I suspect you are looking for something like knitr with rmarkdown (.Rmd files to create HTML or Word) or LaTeX (.Rnw files to create PDF). --- Jeff Newmiller

Re: [R] Regression Overdispersion?

2015-02-01 Thread David Winsemius
On Feb 1, 2015, at 8:26 AM, JvanDyne wrote: I am trying to use Poisson regression to model count data with four explanatory variables: ratio, ordinal, nominal and dichotomous – x1, x2, x3 and x4. After playing around with the input for a bit, I have formed – what I believe is – a series of

[R] the less-than-minus gotcha

2015-02-01 Thread Mike Miller
I've got to remember to use more spaces. Here's the basic problem: These are the same: v 1 v1 But these are extremely different: v -1 v-1 This mistake can get you even inside of a function call like this: v - -2:2 which( v1 ) [1] 1 2 3 which( v-1 ) # oops, I meant v -1 not v-1 a HUGE

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Kevin E. Thorpe
Using = has it's problems too. For example, print(fit - lm(...)) Assigns the result of the lm call to fit and prints the results. This is quite a useful trick actually. print(fit = lm(...)) Throws an error. Moral of story, computers do what you tell them, not what you meant. Kevin On

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Ben Bolker
Mike Miller mbmiller+l at gmail.com writes: I've got to remember to use more spaces. Here's the basic problem: These are the same: v 1 v1 But these are extremely different: v -1 v-1 This is indeed documented, in passing, in one of the pages you listed:

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Steve Taylor
All the more reason to use = instead of - -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: Monday, 2 February 2015 2:07p To: r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-minus gotcha Mike Miller mbmiller+l at gmail.com

[R] Boundaries and deldir

2015-02-01 Thread p_connolly
Just what is meant by dummy points as referred to by the help for the deldir() function? I understood they indicated the boundary beyond which triangulation would cease. I thought I would need the x/y elements (as described in the help file at the end of the description of the use of the dpl

Re: [R] Repeat elements of character vector

2015-02-01 Thread PIKAL Petr
Hi Just a warning. Do you intend it for naming some objects. If yes do not do it, use list instead. If not, just discard my comment. Cheers Petr -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Knut Hansen Sent: Friday, January 30, 2015 2:34 PM