Learn R Programming

kStatistics (version 1.0)

list2Set: List To Set

Description

Given a list, delete the instances of an element in the list, leaving the order inalterated.

Usage

list2Set(v)

Arguments

v

single array or list of arrays

Value

set

sequence of distinct elements given in v

See Also

list2m, m2Set

Examples

Run this code
# NOT RUN {
list2Set(c(1,2,3,1,2,5,6)) 
#returns c(1,2,3,5,6) 

list2Set( list(c(1,2),c(1,2),c(10,11),c(1,2),c(7,8))) 
#returns list(c(1,2),c(10,11),c(7,8))
# }

Run the code above in your browser using DataLab