collect: Collect R object

Description Usage Arguments Details Examples

Description

Collect R object

Usage

1
2
3
4
5
6
global_objects()

nms_objects(pkgs = NULL, ...)

ls_objects(class = NULL, environment = ".GlobalEnv", eval = FALSE,
  nms = FALSE, ...)

Arguments

pkgs

The name of a package such as package:<PACKAGE_NAME>

...

Further arguments

class

Class of R object (character)

environment

which environment (work space) to search the available objects

eval

which include evaluate value

nms

attached packages names

Details

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# Return objects in .GlobaEnv
my_iris <- iris
ls_objects()
# Filter by object class
ls_objects("data.frame")
# Storage a evaluate value
ls_objects("data.frame", eval = TRUE)

# Filter object class and environment
ls_objects("data.frame",
           nms = TRUE,
           pkgs = "package:datasets")

library(dplyr)
ls_objects(c("function", "tbl"),
           nms = TRUE,
           pkgs = "package:dplyr")

e <- rlang::env(my_data1 = iris, my_data2 = mtcars)
ls_objects(environment = "e", nms = FALSE)

## End(Not run)

uribo/sealr documentation built on May 26, 2019, 5:34 a.m.