Description Usage Arguments Details Value Examples
Create a reference to a 'part' of an R object. Use deref or `!` to obtain the values
within the referenced object.
1 |
x |
object to be referenced; must be a symbol or character |
... |
objects passed to |
slice is similar to ref; it creates a reference to another R object. There are two
main differences with ref. First, slice only accepts names or characters instead of
expressions. Second, slice records a part of the underlying object. slice(x, 1:2, 3)
is equivalent to the reference of x[1:2, 3]. This is similar to ref(x[1:2, 3]), though the
implementation is different. ref would create an expression with a reference to x, while
slice(x, 1:2, 3) creates a list with a reference to x and the extract inputs. slice
is more efficient, but is limited in its capabilities.
object of class "slice" and "ref"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.