[R] Boxplot function error-help required

David Winsemius dwinsemius at comcast.net
Fri Jun 12 00:00:59 CEST 2015


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



More information about the R-help mailing list