rawr_ls | R Documentation |
These functions begin with ls
and list different things. lss
is an "improved" ls
which gives more details of objects in
the workspace such as type, size, and dimensions; lsp
lists
p
ackage contents, i.e., exported and/or non exported objects,
methods, lazy data, etc.; and lsf
lists package f
iles. See
details and examples.
lss(
pos = 1L,
pattern,
by = NULL,
all.names = FALSE,
decreasing = TRUE,
n = Inf
)
lsf(package, file = "DESCRIPTION")
lsp(package, what, pattern)
pos |
argument specifying the environment as a position in search list or a "list-like" object such as a data frame or list of objects |
pattern |
optional |
by |
variable to order output ("type", "size" (default), "sizef", "nrow", or "ncol") |
all.names |
logical; if |
decreasing |
logical; if |
n |
number of objects to displace if |
package |
package name, as a |
file |
file to return as a character string; usual options are
|
what |
what to get; |
lsf
prints package files (e.g., DESCRIPTION
, NEWS
,
INDEX
, NAMESPACE
, etc.) to console and returns (invisibly)
the files parsed for easier use.
lsp
is a helper function to list exported (?"::"
) and non
exported (?":::"
) functions (and other features from a package's
NAMESPACE
file).
Note that base
and older packages do not have a NAMESPACE
file in which case, for base
packages, lsp
returns
ls(.BaseNamespaceEnv, all.names = TRUE)
, and throws an error
otherwise.
Possible values for what
are "all
" (default), NULL
,
"exports
", "imports
", "dynlibs
", "lazydata
",
"path
", "S3methods
", "spec
", and others depending on
the package.
lsp(packagename, "?")
to see options for a specific package.
lsp(packagename, NULL)
to return all information in a list.
lss
returns a data frame with each object from the workspace with
type, object size, and dimensions for each. lsf
(invisibly) returns
the contents of file
after being printed to the console. lsp
returns a vector of character strings.
ls
; search
; rawr_parse
## lss(): use like ls()
lss()
a <- rnorm(100000)
b <- matrix(1, 1000, 100)
lss()
## lsf(): these are equivalent ways to use
lsf(rawr)
lsf(rawr, 'DESCRIPTION')
lsf('rawr', 'des')
## lsp: see the contents of a package
lsp(rawr)
## return all one- or two-character functions from base package
lsp(base, pat = '^.{1,2}$')
## for "what" options
lsp('rawr', '?')
## library path
lsp('rawr', 'path')
system.file(package = 'rawr')
## to return everything
lsp('rawr')
## data sets
lsp('rawr', 'lazydata')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.