Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael committed Feb 17, 2020
1 parent 91747e4 commit 5e2cc15
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ set.seed(42)
## What is set6?

`set6` is an R6 upgrade to the `sets` package in R that includes:

* Multi-dimensional sets
* Tuples
* Finite and infinite intervals
Expand Down
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ chat](https://badges.gitter.im/xoopR/set6.png)](https://gitter.im/xoopR/set6)

## What is set6?

`set6` is an R6 upgrade to the `sets` package in R that includes: \*
Multi-dimensional sets \* Tuples \* Finite and infinite intervals \*
Fuzzy sets and tuples \* Set operations including union, intersect,
(asymmetric and symmetric) difference, and product \* Symbolic
representation of infinite sets including common special sets such as
the Reals and Integers \* ConditionalSets for defining sets according to
logical conditions
`set6` is an R6 upgrade to the `sets` package in R that includes:

- Multi-dimensional sets
- Tuples
- Finite and infinite intervals
- Fuzzy sets and tuples
- Set operations including union, intersect, (asymmetric and
symmetric) difference, and product
- Symbolic representation of infinite sets including common special
sets such as the Reals and Integers
- ConditionalSets for defining sets according to logical conditions

## Installation

Expand Down Expand Up @@ -74,10 +78,10 @@ f$inclusion(3)

# Symbolic intervals provide a clean way to represent infinite sets
Interval$new()
#> [-∞, +∞]
#> [-∞,+∞]
# Different closure types and classes are possible
Interval$new(1, 7, type = "(]") # half-open
#> (1, 7]
#> (1,7]
Interval$new(1, 7, class = "integer") == Set$new(1:7)
#> [1] TRUE

Expand All @@ -95,7 +99,7 @@ PosRationals$new()
Set$new(1, 4, "a", "b") + Set$new(5)
#> {1, 4,...,b, 5}
Interval$new(1, 5) + FuzzyTuple$new(1, 0.6)
#> [1, 5]
#> [1,5]

# Power
Set$new(1:5)^2
Expand All @@ -110,7 +114,7 @@ Reals$new()^5
Set$new(1,2) * Set$new(5, 6)
#> {1, 2} × {5, 6}
Interval$new(1,5) * Tuple$new(3)
#> [1, 5] × (3)
#> [1,5] × (3)

# Intersection
Set$new(1:5) & Set$new(4:10)
Expand All @@ -122,7 +126,7 @@ Interval$new(1, 10) & Set$new(5:6)

# Difference
Interval$new(1, 10) - Set$new(5)
#> [1, 5) ∪ (5, 10]
#> [1,5) ∪ (5,10]
Set$new(1:5) - Set$new(2:3)
#> {1, 4, 5}
```
Expand Down

0 comments on commit 5e2cc15

Please sign in to comment.