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
- Host: GitHub
- URL: https://github.com/patrickm663/package2csv
- Owner: patrickm663
- License: bsd-3-clause
- Created: 2022-05-15T10:37:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-15T12:30:09.000Z (about 4 years ago)
- Last Synced: 2025-03-06T16:48:49.609Z (over 1 year ago)
- Language: R
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.