Learn R Programming

x.ent (version 1.1.7)

add_unique:

Description

Add a value to an existing list of values. These values are unique in the list.

Usage

add_unique(list, value)

Arguments

list
: a list of values
value
: a value that we want to add to the list

Value

list
return a list that elements in the list aren't duplicated

Examples

Run this code
  list1= c("a","b","c")
  value = "a"
  list1 <- add_unique(list1,value)

Run the code above in your browser using DataLab