| objectBrowser {tkWidgets} | R Documentation |
This function provides a widget to view objects and select some which
are going to be returned. When the End button is pressed, the
! selected objects will be returned.
objectBrowser(env = parent.frame(1), fun = function(x) TRUE,
textToShow = "Select object(s)", nSelect = -1)
fun |
function to test whether certain conditions are met by the objects. Only objects that meet the conditions will be displayed. |
textToShow |
character with the message to be shown on the widget as an instruction. |
nSelect |
integer indicating the number of objects to select.
No limitation if nSelect = -1 as per default. |
env |
an R environment object whose objects will be browsed |
This function will return a list of lists with a "name" and "obj" pair for each object. The "name" will be the name of the object and "obj" will be the value of the object. If the object is a package, a description of the contents of the package will be the value. If the selected object is a function, a text string of the original code will be the value. A function can be passed to impose a filtering mechanisms on the objects to be displayed. See function isCharacter for an example of writing a filtering function for objectBrowser.
The buttons and their expected behavior are
UpSelect \>\>Reset.GlobalEnv which
is the default starting point of the system.\<\< RemoveClearCancelNULL when
pressed.Endlist of lists with names of the
objects in the box for selected objects and their corresponding values
or NULL if nothing exists in the box.
A list of lists with a name and value pair for each object.
This function is part of the Bioconductor project at Dana-Farber Cancer Institute to provide Bioinformatics functionalities through R.
Jianhua (John) Zhang
## The example here is only run interactively since it requires user
## interference which may cause problems if not available:
if(interactive()) {
# Call the function with the isCharacter function.
r <- objectBrowser()
str(r) # show what we've got
}