[R] difference

2016-10-27 Thread Ashta
Hi all, I want to calculate the difference between successive row values to the first row value within year. How do I get that? Here isthe sample of data Year Num 200125 200175 2001 150 200230 200285 200295 Desired output Year Num diff 200125 0 2001

Re: [R] Significance of Svyrepdesign Object Warning

2016-10-27 Thread Courtney Benjamin
​Thank you; I will do so. Courtney Benjamin Broome-Tioga BOCES Automotive Technology II Teacher Located at Gault Toyota Doctoral Candidate-Educational Theory & Practice State University of New York at Binghamton cbenj...@btboces.org 607-763-8633

Re: [R] Significance of Svyrepdesign Object Warning

2016-10-27 Thread William Dunlap via R-help
For, now I would just use na.action=na.omit instead of na.exclude. My comments were mainly for the package author. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Oct 27, 2016 at 5:53 PM, Courtney Benjamin wrote: > Hello Mr. Dunlap, > > I have gone back and re-read

Re: [R] Significance of Svyrepdesign Object Warning

2016-10-27 Thread Courtney Benjamin
Hello Mr. Dunlap, I have gone back and re-read the responses to my question. I am interested in trying to apply your recommendation so I am doing things correctly; however I am not sure how to go about doing it within my code. It appears that you are digging quite deeply into R where I am

Re: [R] Reg. Error: could not find function "lsei" in limSolve library

2016-10-27 Thread David Winsemius
> On Oct 27, 2016, at 7:12 AM, arunkumar.govindar...@hsbc.co.in wrote: > > Hi, > > I tried to load package from local zip folder in R logic and it worked. > >> utils:::menuInstallLocal() > package ‘limSolve’ successfully unpacked and MD5 sums checked > > when tried to load.. it says, > >>

[R-es] warning en actualizacion

2016-10-27 Thread Sebastian Kruk
Hola usuarios-R, Tengo un problema con la actualización. En mi maquina que tiene Windows 10 tengo instalado R-3.3.1 de 64 bits y 32 bits. Cuando quiero actualizar me salen las siguientes advertencias: > update.packages(ask='graphics',checkBuilt=TRUE) --- Please select a CRAN mirror for use in

Re: [R-es] Encontrar la primera columna no NA

2016-10-27 Thread Jorge I Velez
Excelente! Aqui hay otra aproximación en base: R> t <- Sys.time() R> out <- apply(as.matrix(dat), 1, function(x) x[!is.na(x)][1]) R> difftime(Sys.time(), t) ## Time difference of 0.656173 secs Nada mal :) Saludos, Jorge.- 2016-10-27 11:42 GMT-05:00 Carlos J. Gil Bellosta

Re: [R] Finding starting values for the parameters using nls() or nls2()

2016-10-27 Thread dave fournier
> >> On Oct 25, 2016, at 9:29 AM, dave fournier wrote: >> >> >> >> Unfortunately this problem does not appear to be well posed. >> >>Retention = (b0*Area^(th+1))^b >> >> If b0, th, and b are the parameter only the product (th+1)*b is determined. >> >> This comes from noting that powers

[R] Reg. Error: could not find function "lsei" in limSolve library

2016-10-27 Thread arunkumar . govindaraju
Hi, I tried to load package from local zip folder in R logic and it worked. > utils:::menuInstallLocal() package ‘limSolve’ successfully unpacked and MD5 sums checked when tried to load.. it says, > local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE) +

[R] How to create a list of trellis objects for grid.arrange()

2016-10-27 Thread Agustin Lobo
Given require(raster) require(sp) require(gridExtra) f <- system.file("external/test.grd", package="raster") r <- raster(f) p1 <- spplot(r) p2 <- spplot(r) I would like to plot the equivalent to grid.arrange(p1,p2,ncol=1,nrow=2) but keeping the trellis objects p1 and p2 within one single

Re: [R-es] Encontrar la primera columna no NA

2016-10-27 Thread Olivier Nuñez
Por último, utilizando la indexación lineal de matriz que propusó luisfo en su momento: > t <- Sys.time() > M=as.matrix(dat) > index <- which(!is.na(M)) - 1 > meses<-colnames(M) > M2<- data.table(columna=index %/% nrow(M) +1L, jugador=index %% nrow(M) +1L , > valor=M[index+1L]) >

Re: [R] How to put below code in Automator in iOS

2016-10-27 Thread Sarah Goslee
You should probably ask this on the Mac R-help list, since it's not a general R question and that's where you are likely to find people who know the answer: https://stat.ethz.ch/mailman/listinfo/r-sig-mac Sarah On Thu, Oct 27, 2016 at 11:05 AM, Christofer Bogaso

Re: [R-es] RV: pregunta

2016-10-27 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? ¿No te vale epiDisplay ? Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El 27 de octubre de 2016, 11:56, Dr. José A. Betancourt Bethencourt < josebetancourt@infomed.sld.cu> escribió: > > > > >

Re: [R] How to put below code in Automator in iOS

2016-10-27 Thread S Ellison
>From 'An introduction to R' in the html help system: "If you just want to run a file foo.R of R commands, the recommended way is to use R CMD BATCH foo.R. " There is also a short section on 'Invoking R under OS X' in the 'Introduction to R'; it may help. S Ellison > -Original

[R-es] RV: pregunta

2016-10-27 Thread Dr. José A. Betancourt Bethencourt
De: Dr. Jos� A. Betancourt Bethencourt [mailto:jbetanco...@iscmc.cmw.sld.cu] Enviado el: jueves, 27 de octubre de 2016 05:56 Para: 'r-help-es@r-project.org' Asunto: pregunta Estimados, el paquete EPICALC ya no funciona, �existe alguna manera de utilizarlo sin

Re: [R-es] Encontrar la primera columna no NA

2016-10-27 Thread Javier Villacampa González
Hemos mejorado bastante desde el inicio. Pero aun andamos lejos. Igual es por el merge que hago. Seguire mirando library(microbenchmark) N <- 1e1 tabla <- microbenchmark( # JVG_dplyr ={ # dat %>% # apply( MARGIN = 1, FUN = # function(x){ #

[R] How to put below code in Automator in iOS

2016-10-27 Thread Christofer Bogaso
Hi, I have a piece of code available here http://mcu.edu.tw/~chenmh/teaching/project/r/reference/RTclTkExamples/radiobuttons.html Now I put that code in a .R file and then created an .app file in Mac using Automator as explained below

Re: [R-es] Encontrar la primera columna no NA

2016-10-27 Thread Olivier Nuñez
Otra solución algo más rapida: > t <- Sys.time() > dat[,jugador:=1:.N] > dat2=melt(dat,id.vars="jugador") > setkey(dat2,jugador) > dat2[,index:=min(which(!is.na(value))),by=jugador] > dat2[,.(First_month=variable[index[1]],Value_First_month=value[index[1]]),by=jugador] jugador First_month

Re: [R-es] Encontrar la primera columna no NA

2016-10-27 Thread Javier Villacampa González
Pues parece que para este caso en particular es mejor la solucon con el for vectorizado. Aunque la verdad que la tuyaes muy buena de cara compresion y comprensión de codigo. Igual si tuviese mas columnas la solucin la tuya sería más rápida. Tendré que mirarlo. library(microbenchmark) N <- 1e1

Re: [R-es] Encontrar la primera columna no NA

2016-10-27 Thread Olivier Nuñez
Prueba lo siguiente, no es óptimo, pero creo va bastnate más rapido que los que mencionaste: t <- Sys.time() dat[,First_month := apply(.SD,1,function(x) colnames(.SD)[min(which(!is.na(x)))])] dat[,Value_First_month := apply(.SD,1,function(x) x[min(which(!is.na(x)))])] difftime( Sys.time(), t)

Re: [R] [FORGED] [FORGED] lattice: control panel extent on device

2016-10-27 Thread Ben Tupper
Hi, I had not noticed the difference, but now that I can see them side-by-side it's obvious. I see that I shouldn't have taken out those modifications you had originally set up. They were sort of like extra those extra parts you find after assembling a new gizmo - "Nah, I don't need those

Re: [R] age old problem with rJava

2016-10-27 Thread Jeff Newmiller
The very act of using sudo for this kind of activity creates files that you can only access by using sudo (bad permissions), thereby perpetuating your difficulties. You should be able to limit yourself to only using sudo for installing OS packages (apt-get) which is designed to yield

[R] age old problem with rJava

2016-10-27 Thread Jim Maas
I've installed oracle java 8, at least think I have and tried many things but still getting this error. For some reason if I run R as sudo, then the library rJava loads just fine, but not as user. Any suggestions most welcome. Ubuntu 16.04 linux, R 3.3.1 64-bit Thanks J > library(rJava)

[R-es] Encontrar la primera columna no NA

2016-10-27 Thread Javier Villacampa González
Imaginemos que tenemos una matriz con datos temporales por sujetos. Pongamos que numero de veces que ha jugado una carta en un juego online. Y que quiero saber cuantas veces jugo la carta el primer mes que estuvo en el juego. Pero claro mi matriz guarda los datos temporalmente de tal manera que:

Re: [R] interpretation of plot.svm graph

2016-10-27 Thread Indhira, Anusha
Thanks for letting me know.Please find the image file in below link https://github.com/anushar/bleed-analysis/blob/master/svm_classification_plot.jpeg Thanks -Original Message- From: Jim Lemon [mailto:drjimle...@gmail.com] Sent: 26 October 2016 23:37 To: Indhira, Anusha Cc:

Re: [R] PROBLEM: correspondence analysis with vegan

2016-10-27 Thread PIKAL Petr
Hi Julia Do not be too much distracted by Bert's comments. I also do not have formal statistical background but R usually keeps me on track as clever people designed its functions and made big effort in providing concise help. Together with this help list it can give you pretty good base for