Skip to content

Commit

Permalink
Document description in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Apr 2, 2024
1 parent ec63f2a commit 85dae81
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
The RDatasets package provides an easy way for Julia users to experiment with most of the standard data sets that are available in the core of R as well as datasets included with many of R's most popular packages. This package is essentially a simplistic port of the Rdatasets repo created by Vincent Arelbundock, who conveniently gathered data sets from many of the standard R packages in one convenient location on GitHub at https://github.com/vincentarelbundock/Rdatasets

In order to load one of the data sets included in the RDatasets package, you will need to have the `DataFrames` package installed. This package is automatically installed as a dependency of the `RDatasets` package if you install `RDatasets` as follows:

Pkg.add("RDatasets")

```julia
Pkg.add("RDatasets")
```
After installing the RDatasets package, you can then load data sets using the `dataset()` function, which takes the name of a package and a data set as arguments:

using RDatasets
iris = dataset("datasets", "iris")
neuro = dataset("boot", "neuro")

```julia
using RDatasets
iris = dataset("datasets", "iris")
neuro = dataset("boot", "neuro")
```
You can also get descriptions of the datasets by calling `RDatasets.description`:
```julia
RDatasets.description("datasets", "iris")
# or
RDatasets.description(iris) # only use this on DataFrames returned from `dataset`!
```
# Data Sets

The `RDatasets.packages()` function returns a table of represented R packages:
Expand Down

0 comments on commit 85dae81

Please sign in to comment.