/RDatasets2

Primary LanguageRubyGNU General Public License v3.0GPL-3.0

Rdatasets

Gem Version Build Status

Rdatasets for Ruby. This ruby gem allows you to access over 1200 datasets included in R from Ruby.

  • All the datasets were imported from Rdatasets created by Vincent.
  • This Ruby gem was inspired by Rdatasets.jl created by John Myles White.

Installation

gem install rdatasets

Usage

require "rdatasets"
df = Polars::DataFrame.from_rdatasets("datasets","iris")
df = Rdatasets.load "datasets", "iris"
df = Rdatasets.load :datasets, :iris
df = Rdatasets.datasets.iris
# returns Polars::DataFrame

# available datasets
df = Rdatasets.df

# search
Rdatasets.search "diamonds"
Rdatasets.search /diamonds/

Development

rake data:prepare

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kojix2/rdatasets.

Do you need commit rights to my repository?
Do you want to get admin rights and take over the project?
If so, please feel free to contact me @kojix2.

License

GPL-3. See the documents below for more details.