Learn R Programming

taRifx (version 1.0.6.2)

munch: Recursively delete entries containing `what` before entry pointed to by `which`

Description

Recursively delete entries containing `what` before entry pointed to by `which`

Usage

munch(x, wch, what = "")

Arguments

x

data vector

wch

Vector of indices to check preceding element for `what`

what

What to check for and delete if found in preceding element

Value

A vector of the same type as x with all the `what`'s removed if they were at the `which`-(1,2,3...) locations

Examples

Run this code
# NOT RUN {
x <- c("a","","b","","","","","c","d","","","","e","")
munch( x, c(3,8,9,13) )
# }

Run the code above in your browser using DataLab