list2Set: List To Set

list2SetR Documentation

List To Set

Description

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

Usage

list2Set(v=c(0)) 

Arguments

v

single vector or list of vectors

Value

set

the sequence of distinct elements

Note

Called by the list2m function in the kStatistics package.

Author(s)

Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it

See Also

list2m, m2Set

Examples


# Return the vector c(1,2,3,5,6)
list2Set(c(1,2,3,1,2,5,6)) 
 
# Return the list (c(1,2),c(10,11),c(7,8))
list2Set(list(c(1,2),c(1,2),c(10,11),c(1,2),c(7,8))) 


kStatistics documentation built on June 8, 2022, 5:05 p.m.