insertElement: Auxiliary Function: Insert Elements into Vector

Description Usage Arguments Details Value Examples

Description

Auxiliary function: insertElement can insert specified elements into the specified location of vector, then return a new vector.

Usage

1
insertElement(vec, indexs, values)

Arguments

vec

A vector to be inserted into.

indexs

A vector consisting of location indexs corresponding to the location of new elements after inserted.

values

A vector to be inserted into parameter vec.

Details

the elements in indexs must be sorted by ascending.

Value

A vector

Examples

1
insertElement(c(6,8,10),c(2,4),c(7,9))

xxzcool/scoremodel documentation built on May 4, 2019, 10:56 a.m.