Re: [R] IF LOOOP

2017-06-13 Thread Jim Lemon
Hi Matthias. The first thing I notice is that the vector r: r<-c(1.1717118,1.1605215,1.1522907,1.1422830,1.1065277,1.1165451, 1.1163768,1.1048872,1.0848836,1.0627211,1.0300964,1.0296879, 1.0308194,1.0518188,1.0657229,1.0685514,1.0914881,1.1042577, 1.1039351,1.0880163) doesn't contain the

Re: [R] reading data

2017-06-13 Thread jim holtman
You need to provide reproducible data. What does the file contain? Why are you using 'sep=' when reading fixed format. You might be able to attach the '.txt' to your email to help with the problem. Also you did not state what the differences that you are seeing. So help us out here. Jim

Re: [R] [FORGED] IF LOOOP

2017-06-13 Thread David Winsemius
> On Jun 13, 2017, at 4:10 PM, Rolf Turner wrote: > > On 14/06/17 08:46, matthias worni wrote: >> Hey >> This should be a rather simple quesiton for some of you. I want to make >> some progress in looping... >> I have the vector r, which contains single values --> see

Re: [R] [FORGED] IF LOOOP

2017-06-13 Thread Rolf Turner
On 14/06/17 08:46, matthias worni wrote: Hey This should be a rather simple quesiton for some of you. I want to make some progress in looping... I have the vector r, which contains single values --> see below: r [1] 1.1717118 1.1605215 1.1522907 1.1422830 1.1065277 1.1165451 1.1163768

[R] IF LOOOP

2017-06-13 Thread matthias worni
Hey This should be a rather simple quesiton for some of you. I want to make some progress in looping... I have the vector r, which contains single values --> see below: r [1] 1.1717118 1.1605215 1.1522907 1.1422830 1.1065277 1.1165451 1.1163768 1.1048872 1.0848836 1.0627211 [11] 1.0300964

[R] S-mode PCAs

2017-06-13 Thread Daniel Vecellio
Hi all, I have a file of average SWE observations for 40 years at over 4,000 points and am attempting to do a spatiotemporal analysis of the data using PCA, much like this paper did using snow depth: http://journals.ametsoc.org/doi/pdf/10.1175/1520-0442%281998%29011%3C0856%3ATCIRWS%3E2.0.CO%3B2

[R] reading data

2017-06-13 Thread Ashta
Hi all, I am using R to extract data on a regular basis. However, sometimes using the same script and the same data I am getting different observation. The library I am using and how I am reading it is as follows. library(stringr) namelist <- file("Adress1.txt",encoding="ISO-8859-1") Name <-

Re: [R] Classification and Regression Tree for Survival Analysis

2017-06-13 Thread Achim Zeileis
On Tue, 13 Jun 2017, Dimitrie Siriopol via R-help wrote: I am trying to use the CART in a survival analysis. I have three variables of interest (all 3 ordinal - x, y and z, each of them with 5 categories) from which I want to make smaller groups (just an example 1st category from X variable

Re: [R] fedback from foreach

2017-06-13 Thread Ismail SEZEN
> > On 13 Jun 2017, at 23:05, Bond, Stephen wrote: > > Hi useRs, > > I am running a foreach loop and hoped to get a small message when it hits a > multiple of 1000, but it does not work. > >p <- foreach(i=1:1, .combine='c') %dopar% { >

[R] fedback from foreach

2017-06-13 Thread Bond, Stephen
Hi useRs, I am running a foreach loop and hoped to get a small message when it hits a multiple of 1000, but it does not work. p <- foreach(i=1:1, .combine='c') %dopar% { if(i%%1000==0) print(i) sqrt(i) } What is the proper way to do it. Thanks

Re: [R] understanding I() in lmer formula

2017-06-13 Thread Bert Gunter
If you don't get a prompt reply here, you might do better posting this on the r-sig-mixed-models list (for obvious reasons). 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

[R] understanding I() in lmer formula

2017-06-13 Thread Don Cohen
Is there a difference between I(x*y) and I(y*x) ? I have a call to lmer that results in this complaint: Error in is.alpha2.subordinate * ~z.min.co.res : non-numeric argument to binary operator when I change this line: I(is.alpha2.subordinate*z.min.co.res)+ to this:

Re: [R] Classification and Regression Tree for Survival Analysis

2017-06-13 Thread Bert Gunter
1. Please read and follow the posting guide below. Your post does not meet the guidelines. 2. Search before posting! e.g. on rseek.org: "Regression trees survival analysis" in which you will find: https://cran.r-project.org/web/views/MachineLearning.html -- Bert Bert Gunter "The trouble

[R] Classification and Regression Tree for Survival Analysis

2017-06-13 Thread Dimitrie Siriopol via R-help
I am trying to use the CART in a survival analysis. I have three variables of interest (all 3 ordinal - x, y and z, each of them with 5 categories) from which I want to make smaller groups (just an example 1st category from X variable with the 2nd and 3rd categories from the Y category and 2, 3

[R] Σχετ: plotting gamm results in lattice

2017-06-13 Thread Maria Lathouri via R-help
Hi Duncan Thank you very much for your help.  The function model$gam is correct; it applies to gamm4 as well.  I believe that it is the smooth term the reason that the plots from lattice are not the same as the plots from the plot(model$gam) but at least I can get the smooth line and the

Re: [R-es] Paralelizar R en windows (Jesús Para Fernández)

2017-06-13 Thread PEDRO CONCEJERO CEREZO
Hola, parece que hay diferencias considerables para paralelizar en windows con mclapply: https://www.r-bloggers.com/implementing-mclapply-on-windows-a-primer-on-embarrassingly-parallel-computation-on-multicore-systems-with-r/ (aunque esto es de 2014) Hay alternativas como foreach, aunque mucho

[R] Mean correlation within cluster

2017-06-13 Thread Sergio Ferreira Cardoso
Hello all, I'd like to calculate the mean correlation within a cluster and understand if it's significantly >0. I'm using packages 'geomorph' and 'paleomorph'. #Simulate an array A <- array ( rep ( 1 : 36 , by = 4 ), dim = c ( 12 , 3 , 4 )) #Load 'geomorph' package and superimpose

[R] WG: Fw: Re: rmarkdown and font size

2017-06-13 Thread G . Maubach
Hi Dan, Hi All, I read the below post. I am wondering how do I know which "keys" are available, e.g. "core.r" and "pre". Where kind I find the definition of what can be adjusted and which "words" to use? Kind regards Georg > Gesendet: Donnerstag, 08. Juni 2017 um 16:16 Uhr > Von: "Nordlund,

[R] Antwort: Re: Re: Paths in knitr

2017-06-13 Thread G . Maubach
Hi Yihui, I took root.dir and base.dir out. Everything works fine despite the change. I have implemented the solution Duncun suggested. I have difficulties with the scaling / image size in my report. Some plots are too big, some are too small. I need to adjust any plot. Steep learning curve