It looks like the text didn't show assigning the results of factanal to an object. Try:
pgdata<-read.table("pgfull.txt",header=T) names(pgdata) pgd<-pgdata[,1:54] #missing line model <- factanal(pgd,8) par(mfrow=c(2,2)) plot(loadings(model)[,1],loadings(model)[,2],pch=16,xlab="Factor 1",ylab="Factor 2") plot(loadings(model)[,1],loadings(model)[,3],pch=16,xlab="Factor 1",ylab="Factor 3") plot(loadings(model)[,1],loadings(model)[,4],pch=16,xlab="Factor 1",ylab="Factor 4") plot(loadings(model)[,1],loadings(model)[,5],pch=16,xlab="Factor 1",ylab="Factor 5") On Mon, Jan 24, 2011 at 7:03 AM, Simon Hayward <shayw...@agenda21digital.com> wrote: > Hi all, > > > > I am using the example on page 737 of "The R Book" by Michael J Crawley, > to plot factor loadings against each other (in a multivariate analysis). > > > > However the following line code > > > > > > plot(loadings(model)[,1],loadings(model)[,2],pch=16,xlab="Factor 1", > ylab="Factor 2") > > > > throws an error message > > > > "Error in plot.window(...) : need finite 'xlim' values > > In addition: Warning messages: > > 1: In min(x) : no non-missing arguments to min; returning Inf > > 2: In max(x) : no non-missing arguments to max; returning -Inf > > 3: In min(x) : no non-missing arguments to min; returning Inf > > 4: In max(x) : no non-missing arguments to max; returning -Inf" > > > > I have tried putting in values for the x and y limits, but even then no > points appear in my plots. > > > > Does anyone know what I am doing wrong? > > > > Grateful for any help. > > > > Simon Hayward > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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-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.