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

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Thu, 10 Jun 2010 11:15:50 +0200

Hi

Uwe Ligges <ligges_at_statistik.tu-dortmund.de> napsal dne 10.06.2010 10:37:05:

>
>
> On 10.06.2010 10:19, Petr PIKAL wrote:
> > 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
>
>
> But note that
>
> T <- 0
> mean(x, na.rm=T)
>
> will yield a more surprising result and that's the reason why you really

> should not even start to use F and T (neither for a logical value nor
> for a number).
>
> Uwe Ligges

I believe that if you consider T/F as reserved word and do not assign number or text to it you can be on safe side.

I agree that in programs it is far better to use TRUE/FALSE instead T/F as you never know if user does not define his own T/F (but he can define its own mean function with unexpected result too).

There was some thread about T/F and TRUE/FALSE about half a year ago with no definite output, so I consider it probably still quite controversial item.

Regards
Petr

>
>
>
>
>
> > 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
> >>>>
> >
> > ______________________________________________
> > 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.



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. Received on Thu 10 Jun 2010 - 09:18:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jun 2010 - 10:40:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive