Re: [R] time mathematics

2018-11-20 Thread Bjørn-Helge Mevik
Well, this is not an elegant (or robust) solution, but this would work for the example you give, at least: starttime <- as.POSIXct("2018-11-20 23:01:18") # Just pick a random date format(starttime + c(0:4), format = "%T") There are probably better ways. :) -- Reg

Re: [R] security using R at work

2018-08-09 Thread Bjørn-Helge Mevik
(or at least very difficult) for sensitive information to leak out of the network. I would say that your best bet is to expect all analysis software to have security holes or be compromised, and design your setup/network around that assumption. -- Regards, Bjørn-Helge Mevik signature.asc

Re: [R] PLS in R

2017-12-12 Thread Bjørn-Helge Mevik
u could have three sets in a 3d plot, of course, but that you would have to implement yourself. :) -- Regards, Bjørn-Helge Mevik signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat

Re: [R] PLS in R

2017-12-06 Thread Bjørn-Helge Mevik
hat I get in the Environment > (pls values) Again, that depends on what you want with your model. -- Regards, Bjørn-Helge Mevik signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https:/

Re: [R] pls package - validation

2017-02-08 Thread Bjørn-Helge Mevik
orrelation between the response and the prediction variables. (Or as they tend to say in chemometrics: You don't have a model.) > As I said, I think it better to follow up or complain about me on > stackexchange rather than here. Sorry, I read this too late. :) -- Regards, Bjørn-Helge Mevik s

[R] [R-pkgs] pls 2.6-0 released

2016-12-18 Thread Bjørn-Helge Mevik
() for automatically suggesting the optimal number of components for the model. The function implements two different algorithms, and will optionally plot the RMSEP values and number of components. - A description of selectNcomp() has been added to the vignette. -- Regards, Bjørn-Helge

Re: [R] Version 3.2.3: package not available error with https

2016-03-01 Thread Bjørn-Helge Mevik
t local({ options(useHTTPS = FALSE) }) in the Rprofile.site file, or your ~/.Rprofile. You still get a warning, but you do get the list of http repositories. Come to think about it: would it be an idea if R defaulted to useHTTPS = FALSE if capabilites("libcur") is FALSE?

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-18 Thread Bjørn-Helge Mevik
6 2 2 2 7 3 3 3 8 4 4 4 9 5 5 510 > dim(frame1) [1] 5 2 > names(frame1) [1] "gushVM" "n96" > rm(n96) > pls1 <- plsr(gushVM ~ n96, data = frame1) > pls1 Partial least squares regression , fitted with the kernel

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Bjørn-Helge Mevik
select/deselect which groups of variables you want in the model. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://ww

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Bjørn-Helge Mevik
far as I can remember, you get this error if the n96 object was a data.frame instead of a matrix. Can you check with, e.g., > class(n96) If it says "data.frame", try using I(as.matrix(n96)). -- Regards, Bjørn-Helge Mevik __ R-help@r

[R] Installing R 3.2.2 on machine with old libcurl

2015-10-15 Thread Bjørn-Helge Mevik
or message is still displayed, which can be confusing. Is there a way around this problem? Also, perhaps the useHTTPS option should default to FALSE if the libcurl capability is FALSE? -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org ma

[R] [R-pkgs] pls 2.5-0 released

2015-08-22 Thread Bjørn-Helge Mevik
of a new argument `nrep'. See ?cvsegments for details. - It now has a vignette. - It now has a NEWS file that can be accessed by news(). -- Regards, Bjørn-Helge Mevik ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman

Re: [R] A strange problem using pls package

2015-07-27 Thread Bjørn-Helge Mevik
= mydata) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] - PLS-Package - PLSR loadings

2014-12-17 Thread Bjørn-Helge Mevik
fits too many components (i.e., one starts to model noise), the coefficients of the last components get higher and higher.) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

Re: [R] help plsr function

2014-06-24 Thread Bjørn-Helge Mevik
(). -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Question about R2 in pls package

2013-09-05 Thread Bjørn-Helge Mevik
there, and that for _training_ data it is indeed PCC^2, but _not_ for cross-validation or test data. IMHO, R^2 only has a meaningful interpretation for training data. For test data or cross-validation, I prefer MSEP or RMSEP. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org

Re: [R] Question about the prediction plot in pls package

2013-09-03 Thread Bjørn-Helge Mevik
wish to have them in the same panel, you will have to add the points yourself. This should work: plot(gas1, ncomp=2, asp = 1, line = TRUE) points(predict(gas1, ncomp = 2) ~ gasoline$octane, col = red) -- Regards, Bjørn-Helge Mevik __ R-help@r

[R] [R-pkgs] pls 2.4-3 released

2013-08-11 Thread Bjørn-Helge Mevik
with current CRAN submission policies, pls.options() no longer stores the modified option list in the global environment. This has the effect that the options will have to be set every time R is started, even if the work space was saved an loaded. -- Regards, Bjørn-Helge Mevik

Re: [R] data structure for plsr

2012-10-05 Thread Bjørn-Helge Mevik
this: plsr(resp ~ spec, data = mydata, ) -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

[R] --enable-R-shlib and external BLAS/LAPACK libraries

2012-09-21 Thread Bjørn-Helge Mevik
= /lib64/libc.so.6 (0x7ff5267d7000) /lib64/ld-linux-x86-64.so.2 (0x00344520) libtinfo.so.5 = /lib64/libtinfo.so.5 (0x7ff5265b6000) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] PLSR AND PCR ISSUES

2012-07-30 Thread Bjørn-Helge Mevik
You give us far too little information about what you do, what you want and what happens. Given that, the only help one can give is: Read the documentation. :) -- Regards, Bjørn-Helge Mevik, dr. scient, Research Computing Services, University of Oslo

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-04 Thread Bjørn-Helge Mevik
, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-03 Thread Bjørn-Helge Mevik
anything about which R package you use for PLSR (and since I don't have access to SAS), I can only guess. :) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] PLS Error message

2012-03-06 Thread Bjørn-Helge Mevik
coloumns, but yournewdata$subX only contains 73 coloumns. You must supply a newdata with the same number of coloumns as in the modelling data. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] PLS predict

2012-03-06 Thread Bjørn-Helge Mevik
Thomas Möckel thomas.moc...@nateko.lu.se writes: I have a question about understanding PLS. If I use the predict function of R than it seems to me the function only uses the last latent variable to model new Y values. But should the function not use all latent variables to model new Y´s? It

Re: [R] Dataframes in PLS package

2012-03-05 Thread Bjørn-Helge Mevik
B.1 B.2 1 1 3 2 4 2 2 4 3 5 names(d2) [1] A.1 A.2 B.1 B.2 d2$A NULL d2$A.1 [1] 1 2 -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Dataframes in PLS package

2012-03-05 Thread Bjørn-Helge Mevik
the I(as.matrix()). -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] Dataframes in PLS package

2012-03-05 Thread Bjørn-Helge Mevik
() take _ages_. Then using matrices is easier and faster. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Dataframes in PLS package

2012-02-21 Thread Bjørn-Helge Mevik
. Btw. it is probably a good idea to avoid single-character names for variables. Especially c and C, because they are names of functions in R. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] [R-pkgs] pls 2.3.0 released

2011-12-06 Thread Bjørn-Helge Mevik
at +/-1 SE (since 2.2.0). See ?coefplot - The package now has a name space (since 2.2.0). -- Regards, Bjørn-Helge Mevik ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages

Re: [R] question about plsr() results

2011-12-02 Thread Bjørn-Helge Mevik
introduction to linear models in R, and you will come a long way. There is also a paper in JSS about the pls package: http://www.jstatsoft.org/v18/i02/ -- Cheers, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] plsr how to return my formula

2011-11-28 Thread Bjørn-Helge Mevik
Try to read the pls package article available here: http://www.jstatsoft.org/v18/i02/ -- Cheers, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] use of segments in PLS

2011-10-21 Thread Bjørn-Helge Mevik
. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] R square and F - stats in PLS

2011-10-21 Thread Bjørn-Helge Mevik
hypothesis tests and performance statistics. This is not how PLSR is usually applied, and there are few such tools. The traditional/typical focus amongst PLSR practicioners is much more on prediction performance (RMSEP) and interpretation by plotting scores and loadings. -- Regards, Bjørn-Helge Mevik

Re: [R] getting p-value and standard error in PLS

2011-10-19 Thread Bjørn-Helge Mevik
) regression (the lm() function in R). There you get p-values automatically. Furthermore, a PLS regression with the same number of components as predictor variables is equivalent to OLS, so there seems no reason to use PLS at all in your case. -- Cheers, Bjørn-Helge Mevik

Re: [R] Help with plotting plsr loadings

2011-06-10 Thread Bjørn-Helge Mevik
, not using the `labels' argument, or converting the names manually. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Help with PLSR with jack knife

2011-05-18 Thread Bjørn-Helge Mevik
the significant variables. You can use the jackknife built into plsr to get an indication about significant variables, by adding the argument jackknife = TRUE to the plsr call. Use jack.test(BHPLS1) to do the test. But _PLEASE_ do read the Warning section inf ?jack.test! -- Regards, Bjørn-Helge Mevik

Re: [R] help with PLSR Loadings

2011-05-18 Thread Bjørn-Helge Mevik
is optional), are handled. So don't ask the plot function to use numbers as labels. Use e.g. names instead: labels = names. Tip: It is always a good idea to read the output and error messages very carefully. -- Regards, Bjørn-Helge Mevik __ R-help@r

Re: [R] Fw: Help with PLSR

2011-05-13 Thread Bjørn-Helge Mevik
) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] R at Supercomputing 10

2010-10-27 Thread Bjørn-Helge Mevik
SC10 Disruptive Technology Preview: The First Cloud Portal to “R” and Beyond http://www.hpcinthecloud.com/features/SC10-Disruptive-Technology-Preview--The-First-Cloud-Portal-to-R-and-Beyond-105776458.html?viewAll=y (My apologies if ths has been posted already.) -- Bjørn-Helge Mevik

[R] Problems using external BLAS

2010-08-06 Thread Bjørn-Helge Mevik
\ --with-lapack=-L/site/intel/cmkl/8.1/lib/em64t -lmkl_lapack64 -lmkl \ --enable-R-shlib but we wanted to switch to gcc because not all R packages compile with icc.) Does anyone have any idea about what could be wrong? -- Regards, Bjørn-Helge Mevik

Re: [R] R2 function from PLS to use a model on test data

2010-08-03 Thread Bjørn-Helge Mevik
)^2 instead of 1 - SSE/SST. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] package(pls) - extracting explained Y-variance

2010-06-28 Thread Bjørn-Helge Mevik
= train, intercept = FALSE)$val) (For cross-validated or test set validated models, it uses RMSEP.) -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Gasoline Data in pls package

2010-05-12 Thread Bjørn-Helge Mevik
. [1] http://cran.r-project.org/doc/Rnews/Rnews_2006-3.pdf [2] J. H. Kalivas. Two data sets of near infrared spectra. Chemometrics and Intelligent Laboratory Systems, 37: 255–259, 1997. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list

Re: [R] cross-validation in plsr package

2010-02-22 Thread Bjørn-Helge Mevik
-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Pls package

2009-08-31 Thread Bjørn-Helge Mevik
- data.frame(respmat = I(as.matrix(foo)), predmat = I(as.matrix(bar))) As for missing values: the default behaviour of plsr is to omit cases with missing values. This is controlled by the 'na.action' argument. See ?na.action for details. -- Regards, Bjørn-Helge Mevik

Re: [R] NotePad++ Syntax file

2009-08-11 Thread Bjørn-Helge Mevik
[Ricardo Rodriguez] Your XEN ICT Team webmas...@xen.net writes: John Kane wrote: No but have you had a look at Tinn-R http://www.sciviews.org/Tinn-R/. Any similar option for Mac OS X? I guess you can use Emacs on Mac OS X. -- Bjørn-Helge Mevik

Re: [R] CRAN + geography = Cranography

2009-07-31 Thread Bjørn-Helge Mevik
Barry Rowlingson b.rowling...@lancaster.ac.uk writes: http://www.maths.lancs.ac.uk/~rowlings/R/Cranography/ Absolutely beautiful! Note this is just for fun. No warranties. Maybe I should use a little 'R' as a marker. That would be cool. Maybe I should get a life. :-) -- Bjørn-Helge

Re: [R] PLS regression on near infrared (NIR) spectra data

2009-03-04 Thread Bjørn-Helge Mevik
to suggest me? There is the package 'pls', with Principal Component Regression (PCR) and Partial Least Squares Regression (PLSR). It also contains a couple of plots that are useful for princomp() or prcomp() analyses (PCA). -- Bjørn-Helge Mevik __ R

Re: [R] PCA functions

2009-02-16 Thread Bjørn-Helge Mevik
glenn g1enn.robe...@btinternet.com writes: Is there a function (before I try and write it !) that allows the input of a covariance or correlation matrix to calculate PCA, rather than the actual data as in princomp() Yes, there is: princomp(). :-) -- Bjørn-Helge Mevik

Re: [R] package pls

2008-10-31 Thread Bjørn-Helge Mevik
or cov^2, but I believe they should be identical (up to sign). -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] R command line

2008-10-21 Thread Bjørn-Helge Mevik
Raphael Saldanha [EMAIL PROTECTED] writes: Is there a Gui for R with improvements in the command line? I'm not looking for buttons, menus and etc, but (more) colored syntax, auto-complete commands and etc? ESS in Emacs, perhaps? -- Bjørn-Helge Mevik

Re: [R] Calculate SPE in PLS package

2008-10-20 Thread Bjørn-Helge Mevik
. The crossvalidation implemented in the pls package does not save the cross-validated scores/loadings -- that would consume too much memory. (Calculation of SPE withing the cross-validation routines could have been implemented, but was not.) -- Regards, Bjørn-Helge Mevik

Re: [R] Append to a vector?

2008-08-08 Thread Bjørn-Helge Mevik
Why not simply a - c(a, 5) or a - c(a, b) if b is another vector. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Help in using PCR

2008-07-02 Thread Bjørn-Helge Mevik
], VARS = I(as.matrix(cancerv1[, 2:407]))) otherwise data.frame() will split the matrix into single coloumn variables. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Help in using PCR

2008-07-02 Thread Bjørn-Helge Mevik
achieve this? I don't remember exactly what I did, but this will work, at least: yarn - data.frame(density = ..., train = ...) yarn$NIR - as.matrix(...) For practical purposes, I haven't found any difference between having the matrices with class AsIs and matrix. -- Bjørn-Helge Mevik

Re: [R] Help in using PCR

2008-07-01 Thread Bjørn-Helge Mevik
long time dealing with the formula. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] significant variables in GPLS ?

2008-04-24 Thread Bjørn-Helge Mevik
knowledge) not known. Any significance deduced from them should therefore be regarede as merely indicators. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Different results in calculating SD of 2 numbers

2008-01-16 Thread Bjørn-Helge Mevik
? -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] mvr error in PLS package

2007-11-27 Thread Bjørn-Helge Mevik
traceback() just after receiving the error message. That might tell you more about _where_ the error occurred. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] [R-pkgs] pls version 2.1-0

2007-10-26 Thread Bjørn-Helge Mevik and Ron Wehrens
in the sources for all changes. -- Bjørn-Helge Mevik and Ron Wehrens ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-packages __ R-help@r-project.org mailing list https

Re: [R] Compute R2 and Q2 in PLS with pls.pcr package

2007-10-24 Thread Bjørn-Helge Mevik
-validated R^2 (A.K.A. Q^2): mypls - plsr(Ytrain ~ Xtrain, ncomp = 1, validation=LOO) ## R^2: R2(mypls, estimate = train) ## cross-validated R^2: R2(mypls) ## Both: R2(mypls, estimate = all) -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list

Re: [R] Who uses R?

2007-09-26 Thread Bjørn-Helge Mevik
, algol, phoenix, machine-code, Fortran, BBC-Basic, GLIM, GENSTAT, Linux, S-Plus and finally (probably the best so far!) R. Well, calling Linux a computer language will probably not add too much credibility to the quote(r). :-) -- Bjørn-Helge Mevik

Re: [R] What is RDA file and how to open it in R program?

2007-09-24 Thread Bjørn-Helge Mevik
to ask the one(s) who created the file. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self