Re: [R] pls package - validation

2017-02-07 Thread Bert Gunter
I think this wants a statistical discussion, which is OT here. stats.stackexchange.com would be a better place to post for that. However, if I understand correctly, using pls or anything else to try to fit (some combination of) 501 variables to 16 data points -- and then crossvalidate with 6 data

[R] pls package - validation

2017-02-07 Thread Ladislav Rozkošný
Hi, I'm trying to fit PLSR model in R with 'pls' package with 22 samples (16 train, 6 test). I know that basic for considering of number of component is cross-validation (in my case 'LOO') and then I should choose number of component with minimum of RMSEP (or first minimum). But problem

Re: [R] Gaussian Filter

2017-02-07 Thread Kwesi Quagraine
Hello Catalin, you could have a look on this link first for ideas in constructing your own script. http://stackoverflow.com/questions/7105962/how-do-i-run-a-high-pass-or-low-pass-filter-on-data-points-in-r Cheers! Kwesi On Tue, Feb 7, 2017 at 9:30 PM, Bert Gunter wrote:

Re: [R] Gaussian Filter

2017-02-07 Thread Bert Gunter
Please do your "homework" before posting! Either: https://cran.r-project.org/web/views/TimeSeries.html or search: e.g. "bandpass filter" on rseek.org Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

[R] rms::latex.anova broken?

2017-02-07 Thread Kevin E. Thorpe
I am re-running some logistic regression analyses using lrm from the rms package but latex(anova(...)) appears to be broken on my system. Here is some anova() output followed by the latex() error for two models since the error changes. My sessionInfo() follows the other output. I have updated

[R] Gaussian Filter

2017-02-07 Thread catalin roibu
Dear all! Please help me with a script or package to compute a Gaussian filter. I have a time series (like average mean temperature from 1901-2014) and I want to extract low, high and band pass frequencies using a Gaussian filter with 32 years window. Thank you very much! Best regards! Catalin

Re: [R] Beginner needs help with R

2017-02-07 Thread Bert Gunter
Yes, I was replying to the OP's query **as stated.** I try to avoid guessing what the OP really *meant*, although I grant that sometimes this may be necessary. But do note that the leading 0's in seq() *are* unnecessary: > sprintf("%02d",1:3) [1] "01" "02" "03" Cheers, Bert Bert Gunter "The

Re: [R] Beginner needs help with R

2017-02-07 Thread Ted Harding
Bert, your solution seems to presuppose that the programmer knows beforehand that the leading digit in the number is "0" (which in fact is clearly the case in Nabila Arbi's original query). However, the sequence might arise from some process outside of the progammer's contgrol, and may then either

Re: [R] Beginner needs help with R

2017-02-07 Thread Bert Gunter
No need for sprintf(). Simply: > paste0("DQ0",seq.int(60054,60060)) [1] "DQ060054" "DQ060055" "DQ060056" "DQ060057" "DQ060058" "DQ060059" [7] "DQ060060" Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

[R] ggplot: restricting legend with multiple geoms and nested groups

2017-02-07 Thread Szumiloski, John
Dear useRs: I am having difficulty understanding how to make a legend in ggplot when I only want certain geoms to be indicated, in the presence of nested groups. An example: require(tidyverse) dat <- tibble(X=rep(seq(4),3), # fake data Y=c(-1.11, -0.46,