[R] R-help: beginner question

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Aug 28 16:40:28 CEST 2003

"Monica Palaseanu-Lovejoy" <monica.palaseanu-lovejoy at stud.man.ac.uk> writes:

> Hi,
> I am a beginner user of R. I have a trivial question – I am almost 
> ashamed I cannot figure it out does not matter how many times I 
> am reading the help.
> I have a table in .txt format, tab delimited. I can read it with 
> ‘read.delim()’ with no problems.
> Afterwards I would like to use boxplot function to see if there 
> are any outliers in the column 5 of my data called TPAH16.ppm
> In the boxplot help I saw that I have to declare my data with 
> ‘data()’. I am getting errors does not matter how I am calling 
> ‘data()’, only with the name of the table, with 
> data(read.delim()), or in any other way. So in the end I was not 
> able to use boxplot at all.
> I will appreciate any help “for dummies” you can give me. Also, 
> if you know any other way to identify outliers, or to use Cook 
> dimension to identify them, I will really appreciate.

You don't need data() that's just to get some standard data for the
boxplot() example. What you need is

mydata <- read.delim(...whatever...)

boxplot(V5) # or whatever col.5 is called


with(mydata, boxplot(V5))



(Almost all the boxplot examples appear to be using the formula interface,
which doesn't work without a grouping variable, and only the formula
interface allows you to give a data= argument to boxplot(). At least
one of those should probably be fixed.)

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907

More information about the R-help mailing list