[R] beginner questions: objects and scripts

Duncan Murdoch murdoch at stats.uwo.ca
Thu Oct 14 16:44:49 CEST 2004


On Thu, 14 Oct 2004 07:00:01 -0700 (PDT), Terry Mu
<terry_mu at yahoo.com> wrote :

>hi,
>
>I got some questions on using R,
>
>1. How do I check and edit definition of an object?
>
>for example,
>
>>x <- 1:100
>
>then after a while I want to check how x is defined.
>
>list(x) or whatever functions I know only list its
>content, but I want to see its definition, without
>scrolling up and down, and edit it like "fixing" a
>function.

You can use history() to see the past history of commands, but there's
no automatic way to find the command that produced x.

>2. How to save my work in current session as a nice
>script?
>
>again, I want to save objects as they are defined, not
>numbers, other than copy / paste. I tried dump(), etc.
>In another word, how do you work with R?

history() is very good for that.  

Duncan Murdoch




More information about the R-help mailing list