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" 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
Hi Vik, You need to load the CA package first: library(CA) -Ista On Sun, Sep 26, 2010 at 4:41 PM, Vik Rubenfeld <vikr at mindspring.com> 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" > > 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. >-- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
Thanks very much. -Vik On Sep 26, 2010, at 9:45 AM, Chris Mcowen wrote:> Have you loaded the library after installing it? > > Either use > library(CA) > > Or > > Through the package manager tab > > Hth > Sent from my iPhone > > On 26 Sep 2010, at 17:41, Vik Rubenfeld <vikr at mindspring.com> 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" >> >> 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.
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 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%