Dear  Bjørn-Helge Mevik:

Thank you so much (!!) for your speedy help.   This works perfectly, no
fuss.   My understanding of data.frames is still fuzzy, so I knew it was
some flaw in my understanding.

I enjoyed your very informative writeups on the package in JSS and R-News;
they told me a lot about the method and its objectives.  Would you have any
suggestions on 'primers' for data.frames (particularly the indexing and
cbind())?  I've gone through the Introduction to R (which is a bit too
terse for my comfort) as well as the package writeup for lm (which you have
tried to emulate in your pls interface) but I still don't really 'get it'.

Thanks again for your help on this

Chris





2012/2/21 Bjørn-Helge Mevik <b.h.mevik@usit.uio.no>

> westland <westland@uic.edu> writes:
>
> > Here is what I have done:
> >
> > I read in an 10000 x 8 table of data, and assign the first four columns
> to
> > matrix A and the second four to matrix B
> >
> > pls <-    read.table("C:/Users/Chris/Desktop/SEM Book/SEM Stat
> > Example/Simple Header Data for SEM.csv",    header=TRUE, sep=",",
> > na.strings="NA", dec=".", strip.white=TRUE)
>
> The problem is here:
>
> > A <- c(pls[1],pls[2],pls[3],pls[4])
> > B <- c(pls[5],pls[6],pls[7],pls[8])
>
> This creates lists A and B, not data frames.
>
> Either use cbind() instead of c(), or simply say
>
> A <- pls[,1:4]
> B <- pls[,5:8]
>
> The the rest should work.
>
> 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
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
J. Christopher Westland
Professor, Information & Decision Sciences, University of Illinois - Chicago
601 S. Morgan Street (UH2400) Chicago, IL    60607-7124
Telephone       +1.312.860.0587
Google Voice  +1.209.757.8849
westland@uic.edu
http://uic.edu/~westland

	[[alternative HTML version deleted]]

