Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I want to browse a .rda file (R dataset). I know about the View(datasetname) command. The default R.app that comes for Mac does not have a very good browser for data (it opens a window in X11). I like the RStudio data browser that opens with the View command. However, it shows only 1000 rows and omits the remaining. Is there a good browser that will show all rows in the data set and that you like/use.

Thanks.

share|improve this question
1  
+1 Great Question. I'll be keen to see the answers. –  Jeromy Anglim Jun 4 '11 at 5:18

6 Answers 6

up vote 15 down vote accepted

Here are a few basic options, but like you, I can't say that I'm entirely happy with my current system.

Avoid using the viewer:

  • I.e., Use the command line tools to browse the data
  • head and tail for showing initial and final rows
  • str for an overview of variable types
  • basic extraction tools like [,1:5] to show the first five colums
  • Use a pager to display and navigate the data (e.g., page(foo, "print")) possibly in conjunction with some variable extraction tools. This works fairly well on Linux, which uses less. I'm not sure how it goes on Windows or Mac.

Export to spreadsheet software:

share|improve this answer
    
(+1) most often I also export to spreadsheets, some times edit(your_data_object) is also useful, not sure about limitations in rows and columns for this function though. –  Dmitrij Celov Jun 4 '11 at 12:27
3  
(+1) too. The Data Browser in Stata is not perfect but it's one of the reasons why I launch Stata rather than R(Studio) in many circumstances. –  Fr. Jun 4 '11 at 15:29
1  
In re: your second bullet, RExcel purportedly makes passing data between R and Excel more seamless, though it's only available on Windows. I haven't tried it (I'm not on Windows); I'm basically content with write.csv :) –  JMS Jun 4 '11 at 18:17
    
@Jeromy Pager works fine on Mac. –  chl Jun 5 '11 at 10:26
2  
@Curious2learn: are you seriously going to look through 700 Mb of data manually? Most of the options given by Jeromy (head, tail, str etc.) should suffice. If you want a "larger" view of your data... plot it (plot, qqplot, hist etc) –  nico Jun 28 '11 at 5:27

I recommend highly the R Package googleVis, R bindings to the Google Visualization API. The Package authors are Markus Gesmann and Diego de Castillo.

The data frame viewer in googleVis is astonishingly simple to use.

These guys have done great work because googleVis is straightforward to use, though the Google Visualization API is not.

googleVis is available from CRAN.

The function in googleVis for rendering a data frame as a styled HTML table is gvisTable().

Calling this function, passing in an R data frame render R data frames as interactive HTML tables in a form that's both dashboard-quality and functional.

A few features of googleVis/gvisTable i have found particularly good:

  • to maintain responsiveness as the number of rows increases, user-specified parameter values for pagination (using arrow buttons); if you don't want pagination, you can access rows outside of the view via a scroll bar on the right hand side of the table, according to parameters specified in the gvisTable() function call

  • column-wise sort by clicking on the column header

  • the gvisTable call returns HTML, so it's portable, and though i haven't used this feature, the entire table can be styled the way that any HTML table is styled, with CSS (first assigning classes to the relevant selector)

To use, just import the googleVis Package, call gvisTable() passing in your data frame and bind that result (which is a gvis object) to a variable; then call plot on that gvis instance:

library(googleVis)

gvt = gvisTable(DF)

plot(gvt)

You can also pass in a number of parameters, though you do this via a single argument to gvisTable, options, which is an R list, e.g.,

gvt = gvisTable(DF, options=list(page='enable', height=300))

Of course, you can use your own CSS to get any fine-grained styling you wish.

When plot is called on a gvis object, a browser window will open and the table will be will be loaded using Flash

:

share|improve this answer
    
(+1) Very nice! –  chl Jun 28 '11 at 6:39
1  
This doesn't seem to work all that well for moderate to large data sets. –  Zach Aug 1 '12 at 17:20

RStudio (RStudio.org) has a built-in data frame viewer that's pretty good. Luckily it's read-only. RStudio is very easy to install once you've installed a recent version of R. If using Linux first install the r-base package.

share|improve this answer
2  
Yes, I like the viewer in RStudio. However, as I said in my post, it shows only first 1000 rows. Can I increase this by changing some setting. I tried to change max.print, but that did not affect the data viewer. –  Curious2learn Jun 5 '11 at 15:09
    
@ Curious2learm: you should ask them to add this option in the next RStudio version on support.rstudio.org/help/discussions/suggestions They usually answer within 2 days –  RockScience Jun 28 '11 at 4:11

Here are some other thoughts (although I am always reluctant to leave Emacs):

  • Deducer (with JGR) allows to view a data.frame with a combined variable/data view (à la SPSS).
  • J Fox's Rcmdr also offers edit/viewing facilities, although in an X11 environment.
  • J Verzani's Poor Man Gui (pmg) only allows for quick preview for data.frame and other R objects. Don't know much about Rattle capabilities.

Below are two screenshots when viewing a 704 by 348 data.frame (loaded as an RData) with Deducer (top) and Rcmdr (bottom).

enter image description here

enter image description here

share|improve this answer

You can get View() to display all of your data in RStudio. The trick is that you need to use the command syntax utils::View() instead. (For slightly more information, see my answer on Stack Overflow here: R View() does not display all columns of data frame.)

share|improve this answer

Recently I started to keep the data in a sqlite database, access the database directly from R using sqldf and view / edit with a database tool named tksqlite

Another option is to export the data and view / edit with Google Refine

share|improve this answer
    
Thanks for the information. I will figure out how to export the data to Google Refine and see if that works well. –  Curious2learn Jun 5 '11 at 18:36
1  
Another very neat tool for viewing or editing data in sqlite databases is sqlitebrowser.org –  Dominic Comtois Nov 25 at 5:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.