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

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
2
## S3 replacement method for class 'pubprint'
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.

Details

No further details.

Value

The updated pubprint object.

See Also

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

Examples

1
2
3
4
5
6
7
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")

pubprint documentation built on May 29, 2017, 2:55 p.m.