[R] How to add a new plot in the same graph using add=T at the command plot?

Petr PIKAL petr.pikal at precheza.cz
Thu Jun 10 10:19:11 CEST 2010


Hi

Peter Ehlers <ehlers at ucalgary.ca> napsal dne 09.06.2010 19:05:24:

> Soapbox:
> Well, if you're just starting out with R it would be
> a VERY good idea to learn right away that T is not TRUE
> and F is not FALSE, at least not always. Sooner or
> later you WILL have problems. So do yourself a favour
> and get into the habit of using TRUE/FALSE instead of T/F.
> 
> (I know that Petr knows better.)

Yes good point. However when I work interactively with command prompt I 
often (well almost exclusively :-) use T/F instead of TRUE/FALSE as I am 
lazy to type. It is necessary to keep habit not to use 
T/F/c/matrix/vector/... as names for objects. So T can be used as 
abbreviation for TRUE like

mean(x, na.rm=T)

as long as you do not define 

T <- "Title"
mean(x, na.rm=T)
Error in if (na.rm) x <- x[!is.na(x)] : 
  argument is not interpretable as logical

at least until T/F is removed from such use by R developers

You can even try

?"T"

and you can read help page for that.

Regards
Petr


> 
>   -Peter Ehlers
> 
> On 2010-06-09 9:08, Larissa Lucena wrote:
> > Thanks so much!!! I'm using R for the first time, and so, I have many 
stupid
> > doubts! Sorry and thanks again!
> >
> >   Regards!
> >
> > 2010/6/9 Petr PIKAL<petr.pikal at precheza.cz>
> >
> >> Hi
> >>
> >> where did you find parameter add=T.
> >>
> >> You can use
> >>
> >> par(new=T)
> >> before using new plot command
> >>
> >> or use
> >>
> >> points, lines
> >>
> >> Regards
> >> Petr
> >>



More information about the R-help mailing list