How to create sets using vector values in R?

A set in mathematics is defined as the collection of unique elements and the order of the elements does not matter. In R, we can create sets using set_power function of sets package. For example, if we have a vector x that contains A, B, C then the sets using the vector x can be created by using set_power(x).

Loading sets package −

library(sets)

Examples

x1>}
x4>}
x7>}
x8
Updated on: 2020-11-06T13:54:34+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements