append {base} R Documentation

Vector Merging

Description


Add elements to a vector.

Usage

append(x, values);

Arguments

x

the vector the values are to be appended to.

values

to be included in the modified vector.

env

[as Environment]

Details

for append one tuple list into another tuple list, element value may be overrides if there is duplicated name between the two list. join function could be used for union the element value.

Authors

SMRUCC genomics Institute

Value

A vector containing the values in x with the elements of values appended after the specified element of x.

clr value class

Examples

 let a = list(a = 1, b = 2);
 let b = list(a = 333, c = 5);
 
 str(append(a,b));
 # tuple key ``a`` in list a has been overrided by the 
 # tuple key ``a`` from the list b
 
 # List of 3
 #  $ a : int 333
 #  $ b : int 2
 #  $ c : int 5
 
 str(join(a, b));
 # tuple value of ``a`` will be union in join function
 
 # List of 3
 #  $ a : int [1:2] 1 333
 #  $ b : int 2
 #  $ c : int 5

[Package base version 2.33.856.6961 Index]