[R] Newbie question: histogram

John Fox jfox at mcmaster.ca
Thu Feb 5 15:34:11 CET 2004

Dear Simon,

At 01:45 PM 2/5/2004 +0000, Simon Fear wrote:
>It's not world shattering but for the record the following is not true:
> > -----Original Message-----
> > From: John Fox [mailto:jfox at mcmaster.ca]
> > (snip)
> > In particular, although using with() is perhaps less ambiguous, it is
> > necessary to repeat it for each command.
>You can group as many commands as you like, as in
> > df <- data.frame(x=1:10, y=1:10)
> > with(df, {print(x)
>+ print(y)})
>  [1]  1  2  3  4  5  6  7  8  9 10
>  [1]  1  2  3  4  5  6  7  8  9 10

Indeed, and doing so can be useful, but in analyzing data interactively, 
one generally types a command (or two), examines the output, and then types 
another. Frankly, it's not so much the typing (as Doug Bates pointed out, 
one can recover previous commands) as the inability to forget about the 
data frame that seems the issue to me (and a small one at that).


>Simon Fear
>Senior Statistician
>Syne qua non Ltd
>Tel: +44 (0) 1379 644449
>Fax: +44 (0) 1379 644445
>email: Simon.Fear at synequanon.com
>web: http://www.synequanon.com
>Number of attachments included with this message: 0
>This message (and any associated files) is confidential and
>contains information which may be legally privileged.  It is
>intended for the stated addressee(s) only.  Access to this
>email by anyone else is unauthorised.  If you are not the
>intended addressee, any action taken (or not taken) in
>reliance on it, or any disclosure or copying of the contents of
>it is unauthorised and unlawful.  If you are not the addressee,
>please inform the sender immediately and delete the email
>from your system.
>This message and any associated attachments have been
>checked for viruses using an internationally recognised virus
>detection process.  However, Internet communications cannot
>be guaranteed to be secure or error-free as information could
>be intercepted, corrupted, lost, destroyed, arrive late or
>incomplete. Therefore, we do not accept responsibility for any
>errors or omissions that are present in this message, or any
>attachment, that have arisen as a result of e-mail transmission.
>If verification is required, please request a hard-copy version.
>Any views or opinions presented are solely those of the author
>and do not necessarily represent those of Syne qua non.

John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox

More information about the R-help mailing list