Learn R Programming

pubprint (version 0.2.1)

push<-.pubprint: Adds another item to a pubprint object

Description

push<-.pubprint adds the given item to named memory or pipe of a pubprint object.

Usage

"push"(x, item, add = FALSE, n = 1, ...) <- value

Arguments

x
a pubprint object to which value is added.
item
numeric or character. If item is a numeric, value is added to pipe. If item is a character, value is added to named memory. A warning is thrown, if an existing item is overwritten.
add
logical, indicating if value is added to an existing item. If item is specified, value is added to this item, else argument n is used.
n
numeric. If item is missing and add is true, n indicates to which pipe position (backwards) value is added. Therefore, n = 1 adds the item to the last pipe item, n = 2 to the second last item and so on.
...
further arguments passed to or from other methods.
value
an item pushed to x.

Value

The updated pubprint object.

Details

No further details.

See Also

See push<- for the generic function, pull to extract items again.

Examples

Run this code
ppo <- pubprint()
push(ppo) <- t.test(1:100, 2:101)
push(ppo, add = TRUE) <- .8123 # add d value to last pipe item
push(ppo, item = "i1") <- t.test(1:30, 2:31)

pull(ppo)
pull(ppo, item = "i1")

Run the code above in your browser using DataLab