https://github.com/walkerjameschris/dataclass
An R package for creating data structs with input validation.
https://github.com/walkerjameschris/dataclass
dataclasses validation
Last synced: 5 months ago
JSON representation
An R package for creating data structs with input validation.
- Host: GitHub
- URL: https://github.com/walkerjameschris/dataclass
- Owner: walkerjameschris
- License: other
- Created: 2023-03-12T15:53:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-28T01:52:05.000Z (over 1 year ago)
- Last Synced: 2024-08-13T07:11:24.708Z (8 months ago)
- Topics: dataclasses, validation
- Language: R
- Homepage:
- Size: 141 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - walkerjameschris/dataclass - An R package for creating data structs with input validation. (R)
README
# dataclass
[](https://cran.r-project.org/package=dataclass)
[](https://github.com/walkerjameschris/dataclass/actions?workflow=R-CMD-check)
## Easily Create Structured Lists or Data Frames with Input Validation
Easily define templates for lists and data frames that validate each element.
Specify the expected type (i.e., character, numeric, etc), expected length,
minimum and maximum values, allowable values, and more for each element in your
data. Decide whether violations of these expectations should throw an error or a
warning. This package is useful for validating data within R processes which
pull from dynamic data sources such as databases and web APIs to provide an
extra layer of validation around input and output data.## Typing in R
The package is also experimenting with typing (i.e., enforcing variables to be a
specific type). This can be enforced using `dataclass::enforce_types()` in your
function header. Learn more about this using `?dataclass::enforce_types`.