Reputation: 1289
When using the command View(matrix)
or View(dataframe)
or by doubleclicking in Rstudio on the Data in the global environment, a screen shows up in which you can see your data. However, when scrolling down on that screen the column names dissappear. Is there a "freeze panes" option as in excel?
Thanks
Upvotes: 1
Views: 8126
Reputation: 67778
I find gvisTable
from package googleVis
quite convenient when viewing data in RStudio.
"The gvisTable function reads a data.frame and creates text output referring to the Google Visualisation API, which can be included into a web page, or as a stand-alone page. The actual chart is rendered by the web browser."
gvisTable
opens a viewer pane in RStudio (where local web content can be viewed). The headers are always visible and there are several options that allow you to customize the view. You can sort by variables by clicking on their header.
A simple example:
library(googleVis)
gt <- gvisTable(iris)
plot(gt)
gt <- gvisTable(iris, options = list(page = 'enable', height = 200))
plot(gt)
Upvotes: 1