[R] Issue of reproducibility with gam and lm.wfit in different versions of R

2017-10-23 Thread Sebastien Bihorel
Dear R users, I recently stumbled upon problems of reproducibility while running GAM analyses in different R and gam package versions. In the example below, a small dataset is created in which the y and x1 variables are 100% correlated. The intents of this example were primarily for

Re: [R] read.table(..., header == FALSE, colClasses = )

2017-10-23 Thread Jeff Newmiller
You are constructing the equivalent of a two-line data file, and complaining that it is not treating it like it was one line. If it did used to accept this silently [skeptical] then I for one am glad it produces a warning now. -- Sent from my phone. Please excuse my brevity. On October 23,

Re: [R] How to save and restore a workspace

2017-10-23 Thread Jeff Newmiller
To be specific, the effect of loading packages with the "library" function is NOT saved when you save the workspace... and if you come back much later after you have updated some packages the old saved objects may not work well with those new packages. At the very least you have to re-load all

Re: [R] A list of data frames and a list of colnames.

2017-10-23 Thread Bert Gunter
This doesn't make sense to me: On Mon, Oct 23, 2017 at 2:09 PM, Ed Siefker wrote: > I have a list of file names, and a list of data frames contained in those > files. > > mynames <- list.files() > ## a character vector of file names mydata <- lapply(mynames, read.delim) >

Re: [R] How to save and restore a workspace

2017-10-23 Thread Bert Gunter
Suggestion: Read the "Intro to R tutorial" that ships with R. Alternatively, there are also many good online tutorials, some free, some not. You'll need to spend some time and effort to learn R's basic data structures and paradigms even if you don't get involved in any serious programming. If

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread miriam . alzate
Perdón Freddy, no pretendía que te molestara. Filtrando de una forma normal no servía, por eso pregunté, porque tras intentarlo no me salía y había algo que se me escapaba. Gracias por las respuestas, finalmente he conseguido resolverlo con alguna respuesta. Un saludo, El Lun, 23 de Octubre de

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread miriam . alzate
Muchas gracias. Si ahora funciona con ese código. Gracias El Lun, 23 de Octubre de 2017, 11:37, Alberto Carmona Bayonas escribió: > Hola, se filtra así: > > datos2<-subset(datos, !(evolucionsi==0==0)) > > Con esto creas un subgrupo de datos que cumple esas condiciones. Si en > lugar de AND

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread miriam . alzate
Perfecto, ahora sí funciona. Muchas gracias! Miriam El Lun, 23 de Octubre de 2017, 9:04, Marcelino de la Cruz Rot escribió: > > Datos[!(Datos$evolucionsi==0 & Datos$evolucionno==0),] > > > > > El 23/10/2017 a las 2:00, miriam.alz...@unavarra.es escribió: >> Buenas, >> >> En un conjunto de

Re: [R] How to save and restore a workspace

2017-10-23 Thread Jim Lemon
Hi Jon, Saving your workspace doesn't mean that everything will be rerun when you start a new R session. I just means that persistent objects like data frames will be there. If you type: objects() you will see all of those things that were there when you ended in the last session. Things like

[R] How to save and restore a workspace

2017-10-23 Thread jonnvan
Hello, I recently downloaded R in hopes of learning to use it for statistics. I have promptly run into a problem, as I am unable to save, and later recover, a workspace so I can resume work where I left off. I am using Windows. I indicate "yes" to the pop up after q(). Then when I later reopen

[R] read.table(..., header == FALSE, colClasses = )

2017-10-23 Thread Benjamin Tyner
Hello I noticed that starting with R version 3.3.0 onward, this generates a warning:    > txt <- c("a", "3.14")    > read.table(file = textConnection(txt), header = FALSE, colClasses = c(x = "character", y = "numeric")) the warning is "not all columns named in 'colClasses' exist" and I

Re: [R] Linear regression with tranformed dependant variable

2017-10-23 Thread John C Frain
Before going to stackexchange you should consider if a square root transformation is appropriate for the model that you are trying to estimate. If you do so, you may be able to interpret the coefficients yourself. If no explanation is obvious you probably should not be using a square root

Re: [R] A list of data frames and a list of colnames.

2017-10-23 Thread Rui Barradas
Hello, I think that your code is simple enough to be considered "nice". If you are worried about the for loop, don't, were loops worrying they wouldn't exist. Hope this helps, Rui Barradas Em 23-10-2017 22:09, Ed Siefker escreveu: I have a list of file names, and a list of data frames

Re: [R] R base packages

2017-10-23 Thread Rich Calaway via R-help
This will give you a list of the current base packages: priority <- installed.packages()[,"Priority"] names(priority)[priority %in% "base"] Change "base" to "recommended" to see the current recommended packages. The base packages are part of R, they are not available separately. If you try to

[R] A list of data frames and a list of colnames.

2017-10-23 Thread Ed Siefker
I have a list of file names, and a list of data frames contained in those files. mynames <- list.files() mydata <- lapply(mynames, read.delim) Every file contains two columns. > colnames(mydata[[1]]) [1] "Name" "NumReads" > colnames(mydata[[2]]) [1] "Name" "NumReads" I can set the

Re: [R] R base packages

2017-10-23 Thread Bert Gunter
?library Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Oct 23, 2017 at 11:36 AM, Rene J Suarez-Soto < rene.j.sua...@gmail.com> wrote: >

Re: [R] Linear regression with tranformed dependant variable

2017-10-23 Thread Rui Barradas
Hello, R-Help answers questions on R code, your question is about statistics. You should try posting the question to https://stats.stackexchange.com/ Hope this helps, Rui Barradas Em 23-10-2017 18:54, kende jan via R-help escreveu: Dear all, I am trying to fit a multiple linear regression

[R] Linear regression with tranformed dependant variable

2017-10-23 Thread kende jan via R-help
Dear all, I am trying to fit a multiple linear regression model with a transformed dependant variable (the normality assumption was not verified...).  I have realised a sqrt(variable) transformation... The results are great, but I don't know how to interprete the beta coefficients... Is it

[R] R base packages

2017-10-23 Thread Rene J Suarez-Soto
I installed R 3.4.2 (Windows) and noticed that 30 folders are under my R_HOME/library folder. I assume all of these are R base packages. Is this correct? Where can I see a list of current R base packages? Also; are R base packages also in CRAN? and are these packages updated only when a new

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread eric
Hola Miriam, ya vi dos respuestas que segun yo estan bien, pero por si quieres una opcion con data.table que, al menos a mi , me gusta usar ... aunque en terminos del filtro, obviamente es igual: # obtener todas las filas, excepto aquellas q cumplan con dos

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread Alberto Carmona Bayonas
Hola, se filtra así: datos2<-subset(datos, !(evolucionsi==0==0)) Con esto creas un subgrupo de datos que cumple esas condiciones. Si en lugar de AND quieres usar OR entonces el símbolo lo cambias a | El símbolo de admiración ! es una negación NOT; por tanto te quedas con los datos tales que ni

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread Freddy Omar López Quintero
El lun, 23-10-2017 a las 03:54 +0200, miriam.alz...@unavarra.es escribió: > Gracias...sí pero creo que no me has entendido...El código tampoco es > el > que necesito. Necesito todas las observaciones de Datos, excepto > aquellas > para las que se cumpla conjuntamente que evollucionsi=0 y >

Re: [R] Syntax for fit.contrast (from package gmodels)

2017-10-23 Thread Martin Maechler
> Sorkin, John > on Sun, 22 Oct 2017 22:56:16 + writes: > David, > Thank you for responding to my post. > Please consider the following output (typeregional is a factor having two levels, "regional" vs. "general"): > Call: >

Re: [R] How to define proper breaks in RFM analysis

2017-10-23 Thread Jeff Newmiller
Using quantiles does not imply assumption of normality, unless you drag that assumption in separately. Please go review statistics again, offlist, and come back when you need help with R. -- Sent from my phone. Please excuse my brevity. On October 22, 2017 10:02:57 PM PDT, Hemant Sain

Re: [R-es] Filtrar datos con una excepción

2017-10-23 Thread Marcelino de la Cruz Rot
Datos[!(Datos$evolucionsi==0 & Datos$evolucionno==0),] El 23/10/2017 a las 2:00, miriam.alz...@unavarra.es escribió: Buenas, En un conjunto de datos, llamado Datos, necesito quedarme con todas la observaciones del conjunto excepto con las observaciones que cumplan dos requisitos a la vez.

Re: [R] How to define proper breaks in RFM analysis

2017-10-23 Thread Hemant Sain
hello, I'm confused what you guys are talking about. i just want to set ideal threshold values for my RFM scores which can be done using Quantiles but i don't want to use quantiles because my data is not normally distributed so it will lead to wrong ranges of breaks. to fix this problem I'm