[R] Error: protect () : protection stack overflow

2008-12-09 Thread Bricklemyer, Ross S
I am attempting to create a formula using as.formula for a PLS analysis. I have used the code below successfully, but in a previous R version and with many fewer predictors. Any help getting all of these predictors into one formula would be greatly appreciated. TC.fmla <- as.formula(paste("TC

[R] median of grouped data

2008-06-27 Thread Bricklemyer, Ross S
I am having difficulty calculating the median of grouped data. I have 8 to 10 repeated measures per sample and I have successfully used the following code to calculate the average for each sample. libs.norm.preds.median[,7:9]<-apply(libs.norm.preds.median[,7:9],MARGIN=2, FUN=ave,libs.norm.pred

[R] mvr error in PLS package

2007-11-26 Thread Bricklemyer, Ross S
All, I have been using a data set to build pls models for three different soil properties. Two of the three models run fine; however I receive the following error for the final model. > libs.IC.cal <- mvr(libs.IC.fmla, data = libsdata.cond.cal, > ncomp=20,validation = "LOO", method = "oscor

Re: [R] data structure for plsr

2007-10-16 Thread Bricklemyer, Ross S
From: jim holtman [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 16, 2007 11:13 AM To: Bricklemyer, Ross S Cc: [EMAIL PROTECTED] Subject: Re: [R] data structure for plsr try: str(yarn) to see what the structure is. On 10/16/07, Bricklemyer, Ross S <[EMAIL PROTECTED]> wrote: > All,

[R] data structure for plsr

2007-10-16 Thread Bricklemyer, Ross S
All, I am working with NIR spectral data and it was great to find that the example in ?plsr also used spectral data. Unfortunately, I am having difficulty figuring out how the "yarn" dataset is structured to allow for the plsr model to read: library(pls) data(yard) yarn.oscorespls <- mvr(den

[R] grouping data by a portion of the row name

2007-09-13 Thread Bricklemyer, Ross S
I am attempting to write a routine where I can run PAM (partition around mediods) on a dataset containing multiple soil cores and PCA spectral data from several depths per core. I want to run PAM on each individual core, so I need to group the data by core to run the analysis. Below is an exam