[R] How to add a new plot in the same graph using add=T at the command plot?
Uwe Ligges
ligges at statistik.tu-dortmund.de
Thu Jun 10 12:30:00 CEST 2010
On 10.06.2010 11:15, Petr PIKAL wrote:
> 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.
At least not controversial for me. ;-)
Uwe
> 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.
>
More information about the R-help
mailing list