An open API service indexing awesome lists of open source software.

https://github.com/patrickm663/package2csv

This package allows users to easily download all the datasets from a given R package into CSV for further analysis
https://github.com/patrickm663/package2csv

Last synced: about 2 months ago
JSON representation

This package allows users to easily download all the datasets from a given R package into CSV for further analysis

Awesome Lists containing this project

README

          

# package2csv
This R package allows users to easily download all the datasets from a given R package into CSV for further analysis.

The script is a result of much trial-and-error to automate the process of writing datasets to CSV form. No consise way was available online, so I made my own.

## Installation
### Prerequisite
Ensure 'devtools' is installed and you are able to install packages from GitHub.
```
install.packages("devtools")
```
### Installation using DevTools
Install this package as follows:
```
library(devtools)
devtools::install_github("patrickm663/package2csv")
```
Load the package:
```
library(package2csv)
```
## Running the Package
In an R session, run `datasets_to_csv(, workdir = "")`. _Note: If the directory provided is invalid, `write.csv()` will throw an error._ If `workdir = ` is not specified, it will use your current working directory.

Multiple packages can be read at once by passing the package names as a vector of strings. For example:
```datasets_to_csv(c("MASS", "plyr"))```

## TODO
- [x] Add Man page
- [x] Add support for loading multiple packages
- [x] Allow the user the ability to specify their working directory

## Licence
This is free software with NO WARRANTY offered under BSD 3-Clause.