add_list: Add a new element to a list

Description Usage Arguments Value Author(s) Examples

Description

This is an S3 generic function for + with the class Foo.

Usage

1
2
## S3 method for class 'Foo'
x + y

Arguments

x

a list with class Foo

y

an arbitrary R object

Value

A list with y being added to x as its last element.

Author(s)

Yihui Xie <http://yihui.name>

Examples

1
2
3
4
5
6
7
8
structure(list(1), class = "Foo") + 2

z = list("a")
class(z) = "Foo"
z + letters
z + 5 + matrix(1:4, 2)  # you can add arbitrary objects to z

methods("+")  # check the methods on +

ruiyazhang/riakv documentation built on May 28, 2019, 4:41 p.m.