S-Plus has a great object explorer and data editor built into its GUI. It allows you to easily see all the objects in the workspace at a glance, and sort them by name, size, or date.
As far as I'm aware, the only equivalent for R is the object browser in JGR (http://jgr.markushelbig.org/).
Otherwise I just use the search() and ls() commands most of the time (along with grep() when I have a lot of objects).
# trivial example of routine: search() utils.list <- ls(pos="package:utils") utils.list[grep("edit",utils.list)]
Does anyone have any tricks or suggestions for browsing the R workspace? Are there any point-and-click solutions?
The ESS mode for Emacs has the following to say in its manual:
Ess-rdired provides a dired-like buffer for viewing, editing and plotting objects in your current R session. If you are used to using the dired (directory editor) facility in Emacs, this mode gives you similar functionality for R objects.
To get started, first make sure you can load ess-rdired. Add the following to your .emacs and then restart emacs.
(autoload 'ess-rdired "ess-rdired" "View *R* objects in a dired-like buffer." t)
Start an R session with `M-x R' and then store a few variables, such as:
s <- sin(seq(from=0, to=8*pi, length=100)) x <- c(1, 4, 9) y <- rnorm(20) z <- TRUE
Then use `M-x ess-rdired' to create a buffer listing the objects in your current environment and display it in a new window:
mode length s numeric 100 x numeric 3 y numeric 20 z logical 1
Type C-h m
or ?
to get a list of the keybindings for this mode. For example, with your point on the line of a variable, p
will plot the object, v
will view it, and d
will mark the object for deletion (x
will actually perform the deletion).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With