Re: [R] Help with reshape/reshape2 needed

2017-07-05 Thread Jim Lemon
Oops, that should have been: stretch_df(tadf,"V1","V2") Jim On Thu, Jul 6, 2017 at 8:38 AM, Jim Lemon wrote: > Hi Tom, > Or perhaps: > > #assume the data frame is named "tadf" > library(prettyR) > stretch_df(tadf,1,2) > > Jim > > > On Thu, Jul 6, 2017 at 6:50 AM, Ista

Re: [R] Help with reshape/reshape2 needed

2017-07-05 Thread Jim Lemon
Hi Tom, Or perhaps: #assume the data frame is named "tadf" library(prettyR) stretch_df(tadf,1,2) Jim On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn wrote: > The reason it doesn't work easily with reshape/reshape2 is that the > order of the rows is not determined. Your answer

Re: [R] [FORGED] Re: Question about correlation

2017-07-05 Thread Rolf Turner
On 06/07/17 10:23, Jim Lemon wrote: I think that Goran is right, I didn't take "cor(data)" literally. See fortune(15). cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __

Re: [R] Question about correlation

2017-07-05 Thread Jim Lemon
I think that Goran is right, I didn't take "cor(data)" literally. Jim On Thu, Jul 6, 2017 at 3:38 AM, Göran Broström wrote: > On 2017-07-05 11:56, Jim Lemon wrote: >> >> Hi Chin Yi, >> If you are trying to correlate "Health" with "Disease", i.e. >> >>

Re: [R] Svyglm Error

2017-07-05 Thread Courtney Benjamin
?Problem solved; I did not have the most updated version of R. When I updated it and ran the code, all worked well again. Thanks very much for helping me solve the mistake of an R novice! Courtney Benjamin Broome-Tioga BOCES Automotive Technology II Teacher Located at Gault Toyota

Re: [R] Help with reshape/reshape2 needed

2017-07-05 Thread Ista Zahn
The reason it doesn't work easily with reshape/reshape2 is that the order of the rows is not determined. Your answer could be 1957 1958 ... 1985 1986 0.8625000 0.750 ... 0.7307692 0.2375 0.0733945 0.6435644 ...NA 0.05769231 0.5096154NA ...NA

Re: [R] Help with reshape/reshape2 needed

2017-07-05 Thread Thomas Adams
David, That's just awesome! LOL -- no wonder I couldn't see how the reshape functions could do this; you saved me MANY days! Thank you so much! Best, Tom On Wed, Jul 5, 2017 at 3:48 PM, David L Carlson wrote: > This does not use reshape/reshape2, but it is pretty

[R] unable to collate and parse R files for package ‘colorspace’

2017-07-05 Thread Kabacoff, Robert
When attempting to install the �colorspace� package on RedHat Linux I get the following error. Any help would be appreciated. Rob Rob Kabacoff, Ph.D. Professor, Quantitative Analysis Center Wesleyan University > install.packages("colorspace") Installing package into

Re: [R-es] Deep learning y redes neuronales

2017-07-05 Thread Javier Marcuzzi
Estimados Esos videos no son de R, sin embargo son recomendables, yo supe mirar algunos, incluso la explicación de la teoría de la relatividad está genial, entendible casi para todo el mundo (hasta para mí). Tampoco es R, pero hay una librería ahora desactualizada respecto a otras, lo

Re: [R] Help with reshape/reshape2 needed

2017-07-05 Thread David L Carlson
This does not use reshape/reshape2, but it is pretty straightforward. Assuming X is your example data: > Y <- split(X[, 2], X[, 1]) > vals <- sapply(Y, length) > pad <- max(vals) - vals > Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x]))) > names(Y2) <- names(Y) > X2 <-

Re: [R] Svyglm Error

2017-07-05 Thread Anthony Damico
hi, i am not hitting an error when i copy and paste your code into a fresh console. maybe compare your sessionInfo() to mine? > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Server 2008 R2 x64 (build 7601) Service

Re: [R-es] Deep learning y redes neuronales

2017-07-05 Thread Jesús Para Fernández
Lo esoty viendo y esta muy bien!! Gracias!!! De: Xavi tibau alberdi Enviado: mi�rcoles, 5 de julio de 2017 21:24 Para: Jes�s Para Fern�ndez Cc: r-help-es@r-project.org Asunto: Re: [R-es] Deep learning y redes neuronales Buenas, Aqu�

Re: [R-es] Deep learning y redes neuronales

2017-07-05 Thread Xavi tibau alberdi
Buenas, Aquí tienes un conjunto de videos, poquitos, donde se explica perfectamente, todas las operaciones e incluso el algorithmo de backpropagation. https://www.youtube.com/watch?v=jaEIv_E29sk Espero que se te sea útil. Saludos, Xavier 2017-07-05 21:17 GMT+02:00 Jesús Para Fernández <

Re: [R] Convert date to continuous variable in R

2017-07-05 Thread David L Carlson
How about > difftime(LAI_simulation$Date, LAI_simulation$Date[1], units="days") Time differences in days [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - David L Carlson Department of Anthropology Texas A University College Station, TX 77840-4352

[R] Svyglm Error

2017-07-05 Thread Courtney Benjamin
Greetings, I am revisiting code from several different files I have saved from the past and all used to run flawlessly; now when I run any of the svyglm related functions, I am coming up with an error: Error in model.frame.default(formula = F3ATTAINB ~ F1PARED, data = data, : the ... list

[R] Convert date to continuous variable in R

2017-07-05 Thread Ahmed Attia
How can I convert date to continuous variable staring from 1. I tried as.numeric but R starts counting from default January 1, 1970 while my data start Oct 7, 2009. I need to do this conversion to plot the date on two x-axes (1 and 3). Ex; Date LAI 10/7/2009 0 10/8/2009 0.004173 10/9/2009

[R] Help with reshape/reshape2 needed

2017-07-05 Thread Thomas Adams
Hi all: I'm struggling with getting my data re-formatted using functions in reshape/reshape2 to get from: 1957 0.86250 1958 0.75000 1959 0.3 1960 0.28750 1963 0.67500 1964 0.93750 1965 0.02500 1966 0.38750 1969 0.08750 1970 0.27500 1973 0.5

Re: [R] Question about correlation

2017-07-05 Thread Göran Broström
On 2017-07-05 11:56, Jim Lemon wrote: Hi Chin Yi, If you are trying to correlate "Health" with "Disease", i.e. cydf<-read.table(text="OTU ID Health Disease Bacterial 1 0.29 0.34 Bacterial 2 0.25 0.07 Bacterial 3 0.06 0.06 Bacterial 4 0.07 0.09 Bacterial 5 0.02 0.05",

Re: [R] Please help(urgent) - How to simulate transactional data for reliability/survival analysis

2017-07-05 Thread Mark Sharp
I am trying to figure out the algorithm you are using to calculate event_episodes, event_status, and start_minutes. Where does the 129600 come from? Why is the start(minutes) 0 for the last row instead of 40? Mark R. Mark Sharp, Ph.D. msh...@txbiomed.org > On Jul 5, 2017, at 1:03 AM,

Re: [R] expand gridded matrix to higher resolution

2017-07-05 Thread Jeff Newmiller
You probably ought to be using the raster package. See the CRAN Spatial Task View. -- Sent from my phone. Please excuse my brevity. On July 5, 2017 12:20:28 AM PDT, "Anthoni, Peter (IMK)" wrote: >Hi all, >(if me email goes out as html, than my email client don't do as

Re: [R] Please help(urgent) - How to simulate transactional data for reliability/survival analysis

2017-07-05 Thread Bert Gunter
Strictly speaking, this is reliability, not survival, data, since failed pumps are apparently repaired and put back in service as new. Also, it is not clear from your data whether there is interval censoring: is the recorded "event" time (failure) the actual failure time -- so no censoring -- or

Re: [R] expand gridded matrix to higher resolution

2017-07-05 Thread Anthoni, Peter (IMK)
Hi Jim, thanks that works like a charm. cheers Peter > On 5. Jul 2017, at 12:01, Jim Lemon wrote: > > Hi Peter, > > apply(t(apply(mm,1,rep,each=3)),2,rep,each=3) > > Jim > > On Wed, Jul 5, 2017 at 5:20 PM, Anthoni, Peter (IMK) > wrote: >>

Re: [R] expand gridded matrix to higher resolution

2017-07-05 Thread Jim Lemon
Hi Peter, apply(t(apply(mm,1,rep,each=3)),2,rep,each=3) Jim On Wed, Jul 5, 2017 at 5:20 PM, Anthoni, Peter (IMK) wrote: > Hi all, > (if me email goes out as html, than my email client don't do as told, and I > apologies already.) > > We need to downscale climate data

Re: [R] Question about correlation

2017-07-05 Thread Jim Lemon
Hi Chin Yi, If you are trying to correlate "Health" with "Disease", i.e. cydf<-read.table(text="OTU ID Health Disease Bacterial 1 0.29 0.34 Bacterial 2 0.25 0.07 Bacterial 3 0.06 0.06 Bacterial 4 0.07 0.09 Bacterial 5 0.02 0.05", header=TRUE) print(cor(cydf$Health,cydf$Disease)) [1]

[R] Question about correlation

2017-07-05 Thread SEB140004 Student
Greeting. Dear Mr/Mrs/Miss, OTU ID Health Disease Bacterial 1 0.29 0.34 Bacterial 2 0.25 0.07 Bacterial 3 0.06 0.06 Bacterial 4 0.07 0.09 Bacterial 5 0.02 0.05 Above show the first 6 data sets, may I ask that the reason of R show the error like "Error in cor(data) : 'x' must be numeric" ? And

[R] expand gridded matrix to higher resolution

2017-07-05 Thread Anthoni, Peter (IMK)
Hi all, (if me email goes out as html, than my email client don't do as told, and I apologies already.) We need to downscale climate data and therefore first need to expand the climate from 0.5deg to the higher resolution 10min, before we can add high resolution deviations. We basically need

Re: [R] Please help(urgent) - How to simulate transactional data for reliability/survival analysis

2017-07-05 Thread Sunny Singha
Mark, Below is the sampled simulated granular data format for pumps for trial period of 3 months that I need to transform for survival analysis: 3 months = (60*24*90) minutes i.e 129600 minutes pump_id timingsevents vibration temprature flow pump1 01-07-2017 00:00 0