Re: [R] Viewing a data object

From: Stephen Tucker <>
Date: Tue, 12 Jun 2007 23:25:41 -0700 (PDT)

Hi Horace,

I have also thought that it may be useful but I don't know of any Object Explorer available for R.

However, (you may alread know this but) (1) you can view your list of objects in R with objects(), (2) view objects in a spreadsheet-like table (if they are matrices or data frames) with invisible(edit(objectName)) [which isn't easy on the fingers]. fix(objectName) is also a shorter option but it has the side effect of possibly changing your object when you close the viewing data. For instance, this can happen if you mistakenly type something into a cell; it can also change your column classes when you don't - for example:

> options(stringsAsFactors=TRUE)
> x <- data.frame(letters[1:5],1:5)
> sapply(x,class)
letters.1.5. X1.5

    "factor" "integer"
> fix(x) # no user-changes made
> sapply(x,class)
letters.1.5. X1.5

    "factor" "numeric"

(3) I believe Deepayan Sarkar contributed the tab-completion capability at the command line. So unless you have a lot of objects beginning with 'AuroraStoch...' you should be able to type a few letters and let the auto-completion handle the rest.

Best regards,


> Dear list,
> First apologize that this is trivial and just betrays my slothfulness at
> the keyboard. I'm sick of having to type a long name just to get a glimpse
> of something. For example, if my data frame is named
> 'AuroraStochasticRunsJune1.df" and I want to see what the middle looks
> like, I have to type
> AuroraStochasticRunsJune1.df[ 400:500, ]
> And often I'm not even sure rows 400 to 500 are what I want to see. I
> might have to type the same line many times.
> Is there sort of a R-equivalence of the Object Explorer, like in Splus,
> where I could mouse-click an object in a list and a window pops up? Short
> of that, is there any trick of saving a couple of keystrokes here and
> there?
> Thanks for tolerating this kind of annoying questions.
> H.
> ______________________________________________
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.

Sucker-punch spam with award-winning protection. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 13 Jun 2007 - 06:30:59 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 Wed 13 Jun 2007 - 18:32:00 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.