[R] Newbie Correspondence Analysis Question

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Sep 27 17:43:03 CEST 2010


On Sun, 2010-09-26 at 09:41 -0700, Vik Rubenfeld wrote:
> I'm experienced in statistics, but I am a first-time R user.  I would like to use R for correspondence analysis.  I have installed R (Mac OSX). I have used the package installer to install the CA package.  I have run the following line with no errors to read in the data for a table:
> 
> 	NonLuxury <- read.table("/Users/myUserName/Desktop/nonLuxury.data.txt")
> 
> The R online help appears to suggest that the following line should come next:
> 
> 	> corresp(NonLuxury)
> 
> However, I get the error message:
> 
> 	Error: could not find function "corresp"

You do need to load packages before you can use functions that are
contained within those packages.

For `corresp`, try

require(MASS)
corresp(NonLuxury)

The MASS packages comes with R as a recommended package, so it should
already be installed.

HTH

G

>  
> The CA manual appears to suggest that the following line should come next:
> 
> 	> ca(NonLuxury)
> 
> Again, I get the error message:
> 
> 	Error: could not find function "ca"
> 
> What am I missing? Thanks very much in advance to all for any info.
> 
> 
> -Vik
> ______________________________________________
> R-help at 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.

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list