Description Usage Arguments Details Value Author(s) See Also Examples
These functions provide features required to implement a complete object browser in a GUI client.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | obj_browse(
id = "default",
envir = .GlobalEnv,
all.names = NULL,
pattern = NULL,
group = NULL,
sep = "\t",
path = NULL,
regenerate = FALSE
)
obj_clear(id = "default")
obj_dir()
obj_info(id = "default", envir = .GlobalEnv, object = "", path = NULL)
obj_list(
id = "default",
envir = .GlobalEnv,
object = NULL,
all.names = FALSE,
pattern = "",
group = "",
all.info = FALSE,
sep = "\t",
path = NULL,
compare = TRUE,
...
)
write.objList(x, path, sep = "\t", ...)
## S3 method for class 'objList'
print(
x,
sep = NA,
eol = "\n",
header = !attr(x, "all.info"),
raw.output = !is.na(sep),
...
)
obj_search(sep = "\t", path = NULL, compare = TRUE)
obj_menu(
id = "default",
envir = .GlobalEnv,
objects = "",
sep = "\t",
path = NULL
)
objBrowse(
id = "default",
envir = .GlobalEnv,
all.names = NULL,
pattern = NULL,
group = NULL,
sep = "\t",
path = NULL,
regenerate = FALSE
)
objClear(id = "default")
objDir()
objInfo(id = "default", envir = .GlobalEnv, object = "", path = NULL)
objList(
id = "default",
envir = .GlobalEnv,
object = NULL,
all.names = FALSE,
pattern = "",
group = "",
all.info = FALSE,
sep = "\t",
path = NULL,
compare = TRUE,
...
)
objSearch(sep = "\t", path = NULL, compare = TRUE)
objMenu(
id = "default",
envir = .GlobalEnv,
objects = "",
sep = "\t",
path = NULL
)
|
id |
The id of the object browser (you can run several ones concurrently, providing you give them different ids). |
envir |
An environment, or the name of the environment, or the position
in the |
all.names |
Do we display all names (including hidden variables starting with '.')? |
pattern |
A pattern to match for selecting variables. |
group |
A group to filter. |
sep |
Separator to use between items (if path is not |
path |
The path where to write a temporary file with the requested information. Set to NULL (default) if you don't pass this data to your GUI client by mean of a file. |
regenerate |
Do we force to regenerate the information? |
object |
Name of the object selected in the object browser, components/arguments of which should be listed. |
all.info |
Do we return all the information (envir as first column or not (by default). |
compare |
If TRUE, result is compared with last cached value and the client is updated only if something changed. |
... |
Further arguments, passed to |
x |
Object returned by |
eol |
Separator to use between object entries, default is to list each item in a separate line. |
header |
If |
raw.output |
If |
objects |
A list with selected items in the object browser. |
obj_browse()
does the horse work. obj_dir()
gets the temporary
directory where exchange files with the GUI client are stored, in case you
exchange data through files. You can use a better way to communicate with
your GUI (you have to provide your code) and disable writing to files by
using path = NULL
.
obj_list()
lists objects in a given environment, elements of a recursive
object or function argument.
obj_search()
lists the search path.
obj_clear()
clears any reference to a given object browser.
obj_info()
computes a tooltip info for a given object.
obj_menu()' computes a context menu for selected object(s) in the object explorer managed by the GUI client.
print.objList()
print method for objList
objects.
Depending on the function, a list, a string, a reference to an
external, temporary file or TRUE
in case of success or FALSE
otherwise
is returned invisibly.
Philippe Grosjean phgrosjean@sciviews.org & Kamil Barton kamil.barton@uni-wuerzburg.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Create various context menus
data(iris)
(obj_info(object = "iris"))
data(trees)
# For one object
(obj_menu(objects = "iris"))
# For multiple objects
(obj_menu(objects = c("iris", "trees")))
# For inexistant object (return "")
(obj_info(object = "noobject"))
(obj_menu(objects = "noobject"))
rm(iris, trees)
# For environments
(obj_info(envir = ".GlobalEnv"))
(obj_menu(envir = ".GlobalEnv"))
(obj_info(envir = "SciViews:TempEnv"))
(obj_menu(envir = "SciViews:TempEnv"))
(obj_info(envir = "package:datasets"))
(obj_menu(envir = "package:datasets"))
# For an environment that does not exist on the search path (return "")
(obj_info(envir = "noenvir"))
(obj_menu(envir = "noenvir"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.