Re: [R] Question about subset

2018-04-10 Thread Sebastien Bihorel
Thanks. That works great! > df <- data.frame(x=c(1,1,NA,NA,2), y=c('a','a','a','b','b'), > z=c(TRUE,FALSE,TRUE,FALSE,TRUE)) > cond1 <- 'x==1' > cond2 <- 'x==1 & z' > df x y z 1 1 a TRUE 2 1 a FALSE 3 NA a TRUE 4 NA b FALSE 5 2 b TRUE > subset(df, subset =

Re: [R] convert numeric variables to factor

2018-04-10 Thread Eric Berger
You are missing a comma between "MARITAL" and "JOBSTATUS". On Tue, Apr 10, 2018 at 10:27 AM, Saif Tauheed wrote: > I run this command for converting the numerical variable into factor. > However, I get the following error message. > > > cols<- c(“GrMM", "RELG", "CASTE1",

Re: [R] Question about subset

2018-04-10 Thread Sebastien Bihorel
Thanks. S. Elison provided a similar but apparently more general solution (see other post in thread). - Original Message - From: "David Winsemius" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Monday, April 9, 2018

Re: [R] convert numeric variables to factor

2018-04-10 Thread Saif Tauheed
Thank you very much. After that I have the following error: cols<- c("GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL", "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", "MASSMEDIA_M", "HomeComputer", "HomeInternet") > for (I in cols) {data.frame[,i]=

Re: [R] convert numeric variables to factor

2018-04-10 Thread Saif Tauheed
I run this command for converting the numerical variable into factor. However, I get the following error message. > cols<- c(“GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL" > "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", "MASSMEDIA_M", > "HomeComputer", "HomeInternet")

Re: [R] convert numeric variables to factor

2018-04-10 Thread Michael Dewey
Not sure whether this is the problem but calling your data frame data.frame is not a good idea. On 10/04/2018 11:48, Saif Tauheed wrote: Thank you very much. After that I have the following error: cols<- c("GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL", "JOBSTATUS", "ENG",

Re: [R] Spectral analisys for for R version 3.4.3

2018-04-10 Thread Jeff Newmiller
Please provide a reproducible example of the problem, with sample data. Notes: 1) The Posting Guide points out that this is a plain text mailing list, but does not emphasize how damaged your sent email may be if you fail to set your email program to plain text mode. 2) Technically, 3.4.3 is not

Re: [R] convert numeric variables to factor

2018-04-10 Thread S Ellison
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Saif Tauheed > After that I have the following error: > > cols<- c("GrMM", "RELG", "CASTE1", "SECTOR", "SECTOR4","AGE", "MARITAL", > "JOBSTATUS", "ENG", "EDU", "PARENT_EDU", "MASSMEDIA_F", > "MASSMEDIA_M", "HomeComputer",

Re: [R] Spectral analisys for for R version 3.4.3

2018-04-10 Thread William Dunlap via R-help
stats::spectrum for starters. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Apr 10, 2018 at 5:49 AM, Danniel Lafeta Machado < danniel.laf...@bcb.gov.br> wrote: > Dear all, > Is there any spectral analisys functionality available for R version 3.4.3? > Series() functionality doesn't work

[R] Spectral analisys for for R version 3.4.3

2018-04-10 Thread Danniel Lafeta Machado
Dear all, Is there any spectral analisys functionality available for R version 3.4.3? Series() functionality doesn't work in this version. Regards Danniel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

Re: [R] convert numeric variables to factor

2018-04-10 Thread PIKAL Petr
Hi You could instead of selecting columns by name select them by number Something like your.data[,2:3] <- do.call(data.frame, lapply(your.data[,2:3], factor)) or you could construct a vector of column numbers x <- c(2,3) Cheers Petr -Original Message- From: R-help

Re: [R] Test if data uniformly distributed (newbie)

2018-04-10 Thread Huber, Florian
Dear Mr. Savicky, I am currently working on a project where I want to test a random number generator, which is supposed to create 10.000 continuously uniformly distributed random numbers between 0 and 1. I am now wondering if I can use the Chi-Squared-Test to solve this problem or if the

Re: [R] Fail to save an object using name as string

2018-04-10 Thread Jeff Newmiller
Have you ever noticed that when you run x <- 1:5 y <- 2:6 plot( x, y+1 ) you get the expressions you used in your call to plot on the axis labels? `x` is an expression consisting of a single symbol and y+1 is an expression consisting of the addition operator and two arguments: the symbol x and

Re: [R-es] Miércoles 11 - Abril - Reunión Grupo Usuarios de R de Madrid...

2018-04-10 Thread Carlos Ortega
Disculpad el error... La reunión es el miércoles de la semana que viene. *Miércoles 18 de abril.* Gracias y siento la confusión... Carlos. El 8 de abril de 2018, 17:34, Carlos Ortega escribió: > Buenas a todos, > > Para los que puedan y quieran asistir. > > El

Re: [R-es] Warning en modelo ZINB

2018-04-10 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? Pues casi seguro que tienes un caso de "separación perfecta". Aunque no exista una variable única (p.e., un nivel en una variable categórica) que tenga asociados solo valores 0, es posible que exista una combinación lineal de variables que separe regiones donde solo hay ceros del