Interactively navigate through an object
Source:R/generics.R
, R/assoc.R
, R/conc.R
, and 4 more
explore.Rd
This method only works in an interactive R session to open
'exploration mode', in which the user can navigate through the
object x
by means of brief commands.
Usage
explore(x, ...)
# S3 method for assoc_scores
explore(
x,
n = 20,
from = 1,
from_col = 1,
perl = TRUE,
sort_order = c("none", "G_signed", "PMI", "alpha"),
use_clear = TRUE,
...
)
# S3 method for conc
explore(x, n = 20, from = 1, use_clear = TRUE, ...)
# S3 method for fnames
explore(x, n = 20, from = 1, perl = TRUE, use_clear = TRUE, ...)
# S3 method for freqlist
explore(x, n = 20, from = 1, perl = TRUE, use_clear = TRUE, ...)
# S3 method for tokens
explore(x, n = 20, from = 1, perl = TRUE, use_clear = TRUE, ...)
# S3 method for types
explore(x, n = 20, from = 1, perl = TRUE, use_clear = TRUE, ...)
Arguments
- x
An object of any of the classes for which the method is implemented.
- ...
Additional arguments.
- n
Maximum number of items in the object to be printed at once.
- from
Index of the first item to be printed.
- from_col
Index of the first column to be displayed in the regular area (among all selected columns, including frozen columns). If
from_col
points- perl
Logical. Whether or not the regular expressions used in the exploration session use the PERL flavor of regular expression.
- sort_order
Order in which the items are to be printed. In general, possible values are
"alpha"
(meaning that the items are to be sorted alphabetically), and"none"
(meaning that the items are not to be sorted). Ifx
is an object of classassoc_scores
, a column name or vector of column names may be provided instead.- use_clear
Logical. If
TRUE
, and if the feature is supported by the R environment, the console will be cleared in between all interactive steps in the exploration session.
Details
explore()
is different from other R instructions because it does not
automatically stop executing and show a new regular prompt (>
) in the console.
Instead it shows a special prompt (>>
) at which you can use explore()
-specific
commands. Note that at the special prompt >>
none of the regular R instructions
will work. The instructions that do work at this prompt, for explore()
, are
listed below. After each instruction the user must press ENTER
.
b
(begin): The first items inx
are shown.e
(end): The last items inx
are shown.d
(down n items): The 'next page' of items is shown.u
(up n items): The 'previous page' of items is shown.n
(next item): The list/table shifts one item down the list.p
(previous item): The list/table shifts one item up the list.g {linenumber}
(go to...): Jump to line{linenumber}
.E.g.
g 1000
will jump to the 1000th line.f {regex}
(find...): Jump to the next item matching the regular expression{regex}
.E.g.
f (?xi) astic $
will jump to the next item ending in"astic"
. The software starts searching from the second item presently visible onward.f
will jump to the next item matching the last regular expression used withf {regex}
.This command is not available when
x
is aconc
object.l
(left): Inassoc_scores
objects, move one column to the left.r
(right): Inassoc_scores
objects, move one column to the right.?
: A help page is displayed, showing all possible commands.q
(quit): Terminate interactive session.