Re: [R] DeSolver giving NA as output, but running fully.

2015-04-30 Thread Tsjerk Wassenaar
Hey :) W2MH = y[43]; #number of infected vaccinated males high risk infected with non-vaccine strain length(y0) [1] 42 As a sidenote, would you mind sharing the flow diagram with me, so I can show it to my students doing a practical with DeSolve, as example of a contemporary

Re: [R] LM() and time in R

2015-04-30 Thread Jim Lemon
Hi Livia, You can convert the time of day fields using strptime like this: strptime(sapply(strsplit(time: 08:14:22, ),[,2),%H:%M:%S) This will give you the times as seconds in the current day. If you then wish to divide the day into morning, afternoon and night, you could create three time

Re: [R] GLM: What is a good way for dealing with new factor levels in the test set?

2015-04-30 Thread Jim Lemon
Hi thuksu, Would defining the factor in your training set with all the levels that occur in the test set solve the problem? That is, there would be at least one factor level in the training set even though there were no instances of that factor. Jim On Thu, Apr 30, 2015 at 8:05 AM, thuksu

Re: [R-es] predict nlme

2015-04-30 Thread Olivier Nuñez
- Mensaje original - De: javier ruben marcuzzi javier.ruben.marcu...@gmail.com Para: R-help-es@r-project.org r-help-es@r-project.org Enviados: Jueves, 30 de Abril 2015 4:07:35 Asunto: [R-es] predict nlme Estimados Tengo un error que me desconcierta, es un código que simplifiqué de

Re: [R] Stacking of vectors to form a column vector

2015-04-30 Thread Jim Lemon
Hi Olufemi, I sounds like you have a data frame (let's call it mydata) with at least three elements (columns). You may be trying to use c() in this way: y1to3-c(y1,y2,y3) in which case it won't work. However: y1to3-c(mydata$y1,mydata$y2,mydata$y3) might do what you want, substituting whatever

Re: [R] help - hoslem.test

2015-04-30 Thread John Kane
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example John Kane Kingston ON Canada -Original Message- From: lutipilo...@yahoo.com.br Sent: Wed, 29 Apr 2015 18:45:26 -0700 To: r-help@r-project.org Subject: [R] help - hoslem.test Hello, I'm

[R-es] búsqueda y sustitución masiva

2015-04-30 Thread Carlos Guadián Orta
Hola a tod@s, explico lo que estoy intentando hacer... Tengo un listado de url comprimidas de twitter, entre las cuales hay muchas repetidas, por lo que el número de registros llega a más de 15K. Por otro lado tengo otra lista de esas url únicas con su equivalente ya descomprimido llegando a un

Re: [R-es] búsqueda y sustitución masiva

2015-04-30 Thread Carlos Ortega
Hola, Salvo que lo esté entendiendo mal, con un merge() podrías solucionar el problema. urlGood - merge(url.origen, url.des, by.x=V1, by.y=url1) urlGood sería un data.frame de 15K filas y como columnas todas las que tuviera url.origen y url.des pero pareadas la columna que las vincula: V1 y

Re: [R] help - hoslem.test

2015-04-30 Thread John Kane
-Original Message- From: lutipilo...@yahoo.com.br Sent: Thu, 30 Apr 2015 04:24:32 -0700 To: r-help@r-project.org, jrkrid...@inbox.com Subject: RE: [R] help - hoslem.test load(id3.rda) And what is this? We do not have access to your office or computer hard disc. Please read

Re: [R] help - hoslem.test

2015-04-30 Thread John Kane
Kevin Thorpe pointed out to me that there is a dropbox link at the very bottom of the post that I missed. :( I just downloaded it, read it in and it looks fine. John Kane Kingston ON Canada -Original Message- From: petr.pi...@precheza.cz Sent: Thu, 30 Apr 2015 14:25:23 + To:

Re: [R-es] Analisis de varianza de un modelo strip strip plot

2015-04-30 Thread eric
Genial !! Gracias Carlos, voy a leer la vignette. A todo esto, alguien se acuerda de esas paginas para buscar paquetes y funciones de R ? Se que una estaba en CRAN, pero las otras tambien eran muy buenas porque las use un par de veces, pero no las puedo encontrar en los mails de la lista.

Re: [R-es] Analisis de varianza de un modelo strip strip plot

2015-04-30 Thread Emilio L. Cano
Eric, Tienes estas dos no oficiales: http://crantastic.org/ http://www.rdocumentation.org/ Un saludo, Emilio *Emilio L. Cano* Mobile: +34 665 676 225 skype: emilopezcano twitter: @emilopezcano http://emilio.lcano.com El 30 de abril de 2015, 15:52, eric ericconchamu...@gmail.com escribió:

Re: [R-es] predict nlme

2015-04-30 Thread javier.ruben.marcuzzi
Estimado Oliver Nuñez Envío un ejemplo reproducible. Javier Marcuzzi # de donde tomo datos, y tiene el modelo (en el pdf) library(MCMCglmm) # librería con las funciónes que voy a usar library(nlme) datos0-ChickWeight # creo algunos datos que agrego a los origonales

Re: [R] help - hoslem.test

2015-04-30 Thread PIKAL Petr
I must correct myself, attach does not prevent from modifying the object but can be confusing see ?attach example x-1:5 y-NA xx-data.frame(x,y) attach(xx) The following objects are masked _by_ .GlobalEnv: x, y rm(x,y) x [1] 1 2 3 4 5 yy-x3 xx-cbind(xx,yy) xx x yyy 1 1 NA

Re: [R-es] Analisis de varianza de un modelo strip strip plot

2015-04-30 Thread Freddy Omar López Quintero
2015-04-30 10:52 GMT-03:00 eric ericconchamu...@gmail.com: alguien se acuerda de esas paginas para buscar paquetes y funciones de R ? ​¿Sería esta: http://rseek.org/?​ -- «No soy aquellas sombras tutelares que honré con versos que no olvida el tiempo.» JL Borges [[alternative

Re: [R] help - hoslem.test

2015-04-30 Thread PIKAL Petr
Hi I agree with John Just small refinements in lines -Original Message- -Original Message- From: lutipilo...@yahoo.com.br Sent: Thu, 30 Apr 2015 04:24:32 -0700 To: r-help@r-project.org, jrkrid...@inbox.com Subject: RE: [R] help - hoslem.test load(id3.rda) And

Re: [R] Stacking of vectors to form a column vector

2015-04-30 Thread Marc Schwartz
Hi, Given that a data frame is a list: unlist(mydata[, 1:3]) For example: all(unlist(iris[, 1:3]) == do.call(c, iris[, 1:3])) [1] TRUE Also, note that the returned result in both cases above retains names: unlist(iris[, 1:3]) Sepal.Length1 Sepal.Length2 Sepal.Length3

Re: [R] help - hoslem.test

2015-04-30 Thread Luciane Maria Pilotto
load(id3.rda) attach(id3) #transformando q13 em binária q131-ifelse(q13==1,1,ifelse(q13==2,2,ifelse(q13==3,2, ifelse(q13==4,2,ifelse(q13==5,2,NA) id3-cbind(id3,q131) id3$q131 - as.factor(id3$q131) tp1 - glm(q131 ~ q11 + q10+q12+edcat + q08+q06+ q14, family = binomial(link = logit),

[R] Inference Syntax

2015-04-30 Thread Shivi82
Hi All, This is my first post in the community. I am currently working on finding some inferences from my sample data and the code I have used is: inference(y = nc$weight, x = nc$habit, est = mean, type = ht, null = 0, method = theoretical). While researching more on the code as I have just

Re: [R] LM() and time in R

2015-04-30 Thread Livia Maria Vestergaard
Hello guys, thanks for your quick reply I will try and specific my problem I have over 300.000 observations for different petrol pumps in all of Denmark fra 1. november 2014 - 31 january 2015 for example I have: petrol pump number: / date: 1. november 2014 / time: 08:14:22 / price:

Re: [R] 'Installation of package package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Duncan Murdoch
On 30/04/2015 2:12 PM, Anirudh Jayaraman wrote: I recently upgraded to *R-3.2.0* from *R-2.14.1* on *Ubuntu 12.04 LTS.* I have been *trying to install some add-on packages* (that weren't installed in the earlier version of R) to R-3.2.0. *but to no avail*, getting repeated error messages. For

Re: [R] Stacking of vectors to form a column vector

2015-04-30 Thread Olufemi Bolarinwa
Thank you. your suggestions all worked. Best Regards  On Thursday, 30 April 2015, 11:52, Bert Gunter gunter.ber...@gene.com wrote: ... and if this is what is wanted, somewhat cleaner and more generalizable for programming would be: do.call(c, mydata[,1:3]) ## where the column

Re: [R] Stacking of vectors to form a column vector

2015-04-30 Thread Bert Gunter
Yes, I think unlist() is still better. One caution (for all): make sure the columns are all of the same type/class/mode or you may be in for nasty surprises. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And

[R] Graphs for scientific publication ?

2015-04-30 Thread Jeremy Clark
Dear All, First of all, many thanks to all R contributors for a fantastic program, and especially to Hadley Wickham for creating ggplot2. The following is intended to be a warning that, if the apparently superficial problems described are not sorted out, R could well find itself being superceded.

[R] Problem in r help me

2015-04-30 Thread Ghada Almousa
hello dears I have Search to compare the results between the three types of cluster k-maen ,Em and Hierarchal clusters How i figured the number of iterations , the time required to build each Cluster ,accuracy and sum square error SSE for each cluster in the R programming [[alternative

[R-es] Distr. IRWIN HALL

2015-04-30 Thread Genaro Llusco
LO QUE SE QUIERE REALIZAR ES LA GRAFICA PARA DIFERENTES VALORES DE DE N. i.e. N=1,N=2,..., UN POSIBLE ALGORITMO SERIA, bueno es una idea baga mia les pido una colaboracion alrespecto para poder consolidar fdens - function(n,z) { c - 1/factorial(n-1) for(j in 0:n-1) { z - seq(i,i+1,0.1)

Re: [R] GLM: What is a good way for dealing with new factor levels in the test set?

2015-04-30 Thread thuksu
Hi, Thanks for the reply! I did try this... # res is a data frame levels(res$mytypeid.f) - c(levels(res$mytypeid.f),mynewlevel) logreg - glm(yesno ~ mytypeid.f + amount, data=res, family=binomial) exp(coef(logreg)) # this result shows that the new level is not included in the regression. it's

[R] Editable plot

2015-04-30 Thread IZHAK shabsogh via R-help
Hello,Kindly assist me on how to make the plot from the following programm to be editable  x-c(0.84,1.03,0.96)y-c(1.30,1.46,1.48)z-c(1.32,1.47,1.5)w-c(0.07,0.07,0.07)r-c(500,1000,2000) # Graph cars using a y axis that ranges from 0 to 12plot(r,x, type=o, col=blue, ylim=c(0,1.5),lwd= 2, xlab =

[R] [R-pkgs] New package: lfactors (0.4-0)

2015-04-30 Thread Bailey, Paul
Dear R users, The lfactors package is now available from CRAN. It provides a class lfactor that is similar to the class factor but can be referred to by level or label. This package is best explained with an example flips - lfactor(c(0,1,1,0,0,1), levels=0:1, labels=c(Tails, Heads)) # Tails

[R] 'Installation of package package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Anirudh Jayaraman
I recently upgraded to *R-3.2.0* from *R-2.14.1* on *Ubuntu 12.04 LTS.* I have been *trying to install some add-on packages* (that weren't installed in the earlier version of R) to R-3.2.0. *but to no avail*, getting repeated error messages. For example, *I tried installing swirl*. Here's my

Re: [R] Graphs for scientific publication ?

2015-04-30 Thread Bert Gunter
Jeremy: I suggest you have a look at the latest edition of Paul Murrell's book, R Graphics, as you seem to be unaware that ggplot2 (as well as a 3rd graphics paradigm, the lattice package) and base graphics are built on 2 different and incompatible graphics engines. Obviously, you are entitled

Re: [R] 'Installation of package package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Duncan Murdoch
On 30/04/2015 3:20 PM, Anirudh Jayaraman wrote: In that case, it seems that *libcurl* is not available for R-3.2.0 as I get a message for ** *install.packages(libcurl)* It's not an R package, it's a library that you'll need on your system. package ‘libcurl’ is not available (for R

Re: [R-es] Analisis de varianza de un modelo strip strip plot

2015-04-30 Thread Eric
Perfecto, muchas gracias por las opciones :) Slds, eric. On 4/30/15, Carlos Ortega c...@qualityexcellence.es wrote: O puedes instalarte la ayuda directamente en R con el paquete sos.. sos: Search contributed R packages, sort by package Search contributed R packages, sort by package

Re: [R] Graphs for scientific publication ?

2015-04-30 Thread David L Carlson
More useful to the r-help list would be a reproducible example of the data you are using and a clear statement of what you are trying to accomplish. It is likely that all of your requirements can be easily met, but you spent most of your message talking about what you have tried without telling

Re: [R-es] Distr. IRWIN HALL

2015-04-30 Thread Carlos Ortega
Hola, La función que adjuntas es inconsistente: - z, es para ti un parámetro , pero en la función es un valor calculado. - i, ¿qué valor ha de tomar?. ¿no será function(n,i) en vez de function(n,z). - dentro del bulce, f va incrementándose, pero has de inicializarla. Antes de

[R] Results Differ in Ternary Plot Matrix of Compositional Response Variables

2015-04-30 Thread Rich Shepard
After hours of looking for the reason why one data set plots correctly and another one does not I am still not seeing the reason. The only differences I see between the two data sets is the number of discrete variables (one has 6 years, the other 7 years) and one contains zeros. I wonder if the

Re: [R] Editable plot

2015-04-30 Thread David L Carlson
Do not post in html. You need to change your email software so that it sends messages in plain text only. Look below to see why. Your plot is edited by modifying the code you gave us to change the graph. Save the code in a script file, change it in any way you want and then run the code again

Re: [R] 'Installation of package package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Anirudh Jayaraman
In that case, it seems that *libcurl* is not available for R-3.2.0 as I get a message for ** *install.packages(libcurl)* package ‘libcurl’ is not available (for R version 3.2.0) Or if on Terminal I run *sudo apt-get install libcurl4-openssl-dev* Package libcurl4-openssl-dev is not

[R] New User Having Trouble Loading R Commander on Mac OS Yosemite

2015-04-30 Thread Aaron
I keep getting the same error message when trying to install R Commander. My operating system is Mac OS Yosemite 10.10 I have installed R 3.2, Rstudio, XQuartz (X11), and tcltk-8.x.x-x11.dmg. But I keep getting the following error:Loading required package: splinesLoading required package:

Re: [R] Editable plot

2015-04-30 Thread Jim Lemon
Hi Ishaq, Well, you could do something absolutely ridiculous like this: edit_my_plot-function(x,y,z,w,r) { npoints-length(r) index-1 while(length(index)) { matplot(x=matrix(r,nrow=3,ncol=4),y=cbind(x,y,z,w), xlab=Number of iteration,ylab=Bias, type=b,pch=c(1,22,22,22),lwd=2,

Re: [R] Inference Syntax

2015-04-30 Thread Jim Lemon
Hi Shiv82, This doesn't look like it comes from the SharpeR, iBATGCH, inference packages and there are too many other packages using the term to easily identify it. As Rolf pointed out, alternative hypotheses are typically framed as: two-sided - non-directional, only specifies that the comparison

Re: [R] Inference Syntax

2015-04-30 Thread Rolf Turner
On 30/04/15 23:22, Shivi82 wrote: Hi All, This is my first post in the community. I am currently working on finding some inferences from my sample data and the code I have used is: inference(y = nc$weight, x = nc$habit, est = mean, type = ht, null = 0, method = theoretical). While researching

Re: [R] 'Installation of package package had non-zero exit status' on R-3.2.0 (RStudio Version 0.98.1103) on Ubuntu 12.04 OS

2015-04-30 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch Sent: Thursday, April 30, 2015 1:33 PM To: Anirudh Jayaraman Cc: r-help@r-project.org Subject: Re: [R] 'Installation of package package had non-zero exit status' on R-3.2.0 (RStudio

Re: [R] Stacking of vectors to form a column vector

2015-04-30 Thread Bert Gunter
... and if this is what is wanted, somewhat cleaner and more generalizable for programming would be: do.call(c, mydata[,1:3]) ## where the column indices might have to be adjusted to get the desired columns. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is

Re: [R-es] Analisis de varianza de un modelo strip strip plot

2015-04-30 Thread Carlos Ortega
O puedes instalarte la ayuda directamente en R con el paquete sos.. sos: Search contributed R packages, sort by package Search contributed R packages, sort by package Saludos, Carlos Ortega www.qualityexcellence.es El 30 de abril de 2015, 16:04, Emilio L. Cano emilopezc...@gmail.com escribió:

Re: [R] Stacking of vectors to form a column vector

2015-04-30 Thread MacQueen, Don
Here are two correct uses of the stack command, if by that you mean the stack() function. stack( data.frame(a=1:3, b=4:6, c=7:9) ) values ind 1 1 a 2 2 a 3 3 a 4 4 b 5 5 b 6 6 b 7 7 c 8 8 c 9 9 c stack( list(a=1:3, b=4:6, c=7:9)