Dear Sirm/Madam, Just wondering if someone could help me. I've tried running a code on R and the code includes the following:> Boxplot(~Acc_S$Acc, label=Acc_S$Subj)But I receive the following error message: *Error: could not find function "Boxplot"* I have tried installing all the packages but keep getting teh same error message. The code runs on my supervisors R program and produces a boxplot, but doesn't on mine and am wondering if someone could assist me. Thanks in advance, Kris -- *Kris Singh* Provisional Psychologist MPsych (Clinical Neuropsychology) / PhD Candidate Sanders Building, Room 1.10 University of Western Australia 35 Stirling Highway Crawley WA 6009 Phone: (08) 6488 1418 Email: kris.singh at research.uwa.edu.au [[alternative HTML version deleted]]
R is case sensitive. try "boxplot" not "Boxplot" On Thu, Jun 11, 2015 at 7:20 AM, Kris Singh <kris.singh at research.uwa.edu.au> wrote:> Dear Sirm/Madam, > > Just wondering if someone could help me. I've tried running a code on R > and the code includes the following: > >> Boxplot(~Acc_S$Acc, label=Acc_S$Subj) > > But I receive the following error message: > > *Error: could not find function "Boxplot"* > > I have tried installing all the packages but keep getting teh same error > message. The code runs on my supervisors R program and produces a boxplot, > but doesn't on mine and am wondering if someone could assist me. > > Thanks in advance, > Kris > > -- > *Kris Singh* > Provisional Psychologist > > MPsych (Clinical Neuropsychology) / PhD Candidate > Sanders Building, Room 1.10 > University of Western Australia > 35 Stirling Highway > Crawley WA 6009 > > Phone: (08) 6488 1418 > Email: kris.singh at research.uwa.edu.au > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
Well it might have worked for your supervisor but I don't see how.
As was mentioned it is boxplot , not Boxplot and the rest of the syntax looks
dodgy to say the least.
Try
boxplot(Acc_S$Subj ~ Acc_S$Acc)
I don't see how label = will work , ?boxplot says it should be names = and
as the code stands even that would be redundant.
In any case here is a quick and dirty example that seems to work.
dat1 <- data.frame(aa = sample(letters[1:4], 20, replace = TRUE), bb =
rnorm(20), cc = rnorm(20) )
boxplot(dat1$bb~ dat1$aa, names = c("alpha", "beta",
"gamma", "delta"))
Have a look at
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
and http://adv-r.had.co.nz/Reproducibility.html
for some suggestions on how to ask questions here.
Good luck
John Kane
Kingston ON Canada
> -----Original Message-----
> From: kris.singh at research.uwa.edu.au
> Sent: Thu, 11 Jun 2015 19:20:46 +0800
> To: r-help at r-project.org
> Subject: [R] Boxplot function error-help required
>
> Dear Sirm/Madam,
>
> Just wondering if someone could help me. I've tried running a code on
R
> and the code includes the following:
>
>> Boxplot(~Acc_S$Acc, label=Acc_S$Subj)
>
> But I receive the following error message:
>
> *Error: could not find function "Boxplot"*
>
> I have tried installing all the packages but keep getting teh same error
> message. The code runs on my supervisors R program and produces a
> boxplot,
> but doesn't on mine and am wondering if someone could assist me.
>
> Thanks in advance,
> Kris
>
> --
> *Kris Singh*
> Provisional Psychologist
>
> MPsych (Clinical Neuropsychology) / PhD Candidate
> Sanders Building, Room 1.10
> University of Western Australia
> 35 Stirling Highway
> Crawley WA 6009
>
> Phone: (08) 6488 1418
> Email: kris.singh at research.uwa.edu.au
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and
family!
Visit http://www.inbox.com/photosharing to find out more!
In addition to the other answers, I would suggest that the next time you
get the "could not find function" message, try like this:
help.search('Boxplot')
Among the output from that you should see
graphics::boxplot Box Plots
which should lead you to "boxplot" instead of "Boxplot".
You may see considerably more output from help.search(), depending on what
packages you have installed. For example, when I did it, I found that the
car package has a function named "Boxplot".
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 6/11/15, 4:20 AM, "Kris Singh" <kris.singh at
research.uwa.edu.au> wrote:
>Dear Sirm/Madam,
>
>Just wondering if someone could help me. I've tried running a code on R
>and the code includes the following:
>
>> Boxplot(~Acc_S$Acc, label=Acc_S$Subj)
>
>But I receive the following error message:
>
>*Error: could not find function "Boxplot"*
>
>I have tried installing all the packages but keep getting teh same error
>message. The code runs on my supervisors R program and produces a
>boxplot,
>but doesn't on mine and am wondering if someone could assist me.
>
>Thanks in advance,
>Kris
>
>--
>*Kris Singh*
>Provisional Psychologist
>
>MPsych (Clinical Neuropsychology) / PhD Candidate
>Sanders Building, Room 1.10
>University of Western Australia
>35 Stirling Highway
>Crawley WA 6009
>
>Phone: (08) 6488 1418
>Email: kris.singh at research.uwa.edu.au
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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 Jun 11, 2015, at 2:19 PM, John Kane wrote:> Well it might have worked for your supervisor but I don't see how. > > As was mentioned it is boxplot , not Boxplot and the rest of the syntax looks dodgy to say the least.There is a "Boxplot" function in package 'car' and it has a labels argument which would be partially matched by a label argument, since it precedes the dots in the arglist. So I would try this: library(car) Boxplot(~Acc_S$Acc, label=Acc_S$Subj) -- David.> > Try > boxplot(Acc_S$Subj ~ Acc_S$Acc) > > I don't see how label = will work , ?boxplot says it should be names = and as the code stands even that would be redundant. > > In any case here is a quick and dirty example that seems to work. > > dat1 <- data.frame(aa = sample(letters[1:4], 20, replace = TRUE), bb = rnorm(20), cc = rnorm(20) ) > boxplot(dat1$bb~ dat1$aa, names = c("alpha", "beta", "gamma", "delta")) > > > Have a look at http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html > for some suggestions on how to ask questions here. > > Good luck > > > > John Kane > Kingston ON Canada > > >> -----Original Message----- >> From: kris.singh at research.uwa.edu.au >> Sent: Thu, 11 Jun 2015 19:20:46 +0800 >> To: r-help at r-project.org >> Subject: [R] Boxplot function error-help required >> >> Dear Sirm/Madam, >> >> Just wondering if someone could help me. I've tried running a code on R >> and the code includes the following: >> >>> Boxplot(~Acc_S$Acc, label=Acc_S$Subj) >> >> But I receive the following error message: >> >> *Error: could not find function "Boxplot"* >> >> I have tried installing all the packages but keep getting teh same error >> message. The code runs on my supervisors R program and produces a >> boxplot, >> but doesn't on mine and am wondering if someone could assist me. >> >> Thanks in advance, >> Kris >> >> -- >> *Kris Singh* >> Provisional Psychologist >> >> MPsych (Clinical Neuropsychology) / PhD Candidate >> Sanders Building, Room 1.10 >> University of Western Australia >> 35 Stirling Highway >> Crawley WA 6009 >> >> Phone: (08) 6488 1418 >> Email: kris.singh at research.uwa.edu.au >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. > > ____________________________________________________________ > FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! > Visit http://www.inbox.com/photosharing to find out more! > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.David Winsemius Alameda, CA, USA
On Jun 11, 2015, at 2:44 PM, MacQueen, Don wrote:> In addition to the other answers, I would suggest that the next time you > get the "could not find function" message, try like this: > > help.search('Boxplot')Spencer Graves uses RSiteSearch() as the underlying function for sos::findFn -- David.> > Among the output from that you should see > > graphics::boxplot Box Plots > > which should lead you to "boxplot" instead of "Boxplot". > > > You may see considerably more output from help.search(), depending on what > packages you have installed. For example, when I did it, I found that the > car package has a function named "Boxplot". > > -Don > > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > On 6/11/15, 4:20 AM, "Kris Singh" <kris.singh at research.uwa.edu.au> wrote: > >> Dear Sirm/Madam, >> >> Just wondering if someone could help me. I've tried running a code on R >> and the code includes the following: >> >>> Boxplot(~Acc_S$Acc, label=Acc_S$Subj) >> >> But I receive the following error message: >> >> *Error: could not find function "Boxplot"* >> >> I have tried installing all the packages but keep getting teh same error >> message. The code runs on my supervisors R program and produces a >> boxplot, >> but doesn't on mine and am wondering if someone could assist me. >> >> Thanks in advance, >> Kris >> >> -- >> *Kris Singh* >> Provisional Psychologist >> >> MPsych (Clinical Neuropsychology) / PhD Candidate >> Sanders Building, Room 1.10 >> University of Western Australia >> 35 Stirling Highway >> Crawley WA 6009 >> >> Phone: (08) 6488 1418 >> Email: kris.singh at research.uwa.edu.au >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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 at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.David Winsemius Alameda, CA, USA