Learn R Programming

Xmisc (version 0.2.1)

removeone,list-method: Remove an element from an R object

Description

Remove an element from an R object Note: the R object is altered in place

Usage

"removeone"(obj, x, warn = TRUE, error = TRUE)

Arguments

obj
an R object
x
an element
warn
logical, whether warn at error
error
logical, whether stop at error

Value

NULL and the R object is altered in place

Examples

Run this code
ll=list(1,2,3,a=4,b=5,6,7,c=8,9)
removeone(ll,3)

Run the code above in your browser using DataLab