-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
126 lines (78 loc) · 3.49 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# Rdf: An R Interface for Raven DataFrames
<!-- badges: start -->
[](https://cran.r-project.org/package=raven.rdf)
[](https://cran.r-project.org/package=raven.rdf)
<!-- badges: end -->
This is an R package which provides an I/O interface between R data.frames and Raven DataFrames.
The functions provided by this package allow you to both read and write DataFrame files (.df), as well as serialize/deserialize DataFrames to/from raw vectors.
## Getting Started
You can install the released version of rdf from [CRAN](https://cran.r-project.org/package=raven.rdf) with:
``` r
install.packages("raven.rdf")
```
After installation you can easily read DataFrame files (.df) into R data.frames and persist R data.frame instances to DataFrame files.
Make sure that the library package is loaded:
```r
library("raven.rdf")
```
Then read a DataFrame file into memory with:
```r
df <- readDataFrame("path/to/my/file.df")
```
The *df* variable is a regular R data.frame so you can use it like any other such instance.
You could then do some computations, change values inside the data.frame and then write it back to the file as a Raven DataFrame with:
```r
writeDataFrame("path/to/my/file.df", df)
```
For more options, please see the documentation section below.
## Compatibility
The rdf package requires **R 3.5.0** or higher.
This library does not have any external dependencies.
## Documentation
See the [developer documentation](https://github.com/raven-computing/rdf/wiki) for API usage instructions and examples.
See the R [reference manual](https://cran.r-project.org/web/packages/raven.rdf/raven.rdf.pdf) for the API documentation.
For more information on DataFrames as used by Raven Computing, please see the corresponding [developer documentation](https://www.raven-computing.com/docs/dataframe/).
## Development
If you want to change code of this library or install it manually without downloading from CRAN, you can do so by cloning this repository.
### Setup
The R *devtools* are required in a development environment. The below instructions assume that devtools are loaded within the underlying development environment. We are using *RStudio* as our standard IDE for R projects. The following instructions show how to achieve things on a command line.
### Loading Library Functions
When in the project root directory, you may load the library code with:
```r
load_all()
```
This will temporarily install the rdf library in a non-global workspace. You can then call all functions provided by the rdf library directly.
### Running Tests
Execute all unit tests with:
```r
test()
```
### Build Documentation
Build the documentation with:
```r
document()
```
The above command will build the documentation in the *man* directory with *roxygen2*.
### Perform Checks
If you want to install rdf from source, it is highly recommended to run the automated checks before installing:
```r
check()
```
### Install from Source
If all checks have passed, you can install rdf from source with:
```r
install()
```
You can then attach the rdf package in your projects like any other package.
### Build
You can build a distribution file with:
```r
build()
```
The built file can then be distributed manually.
## License
This library is licensed under the Apache License Version 2 - see the [LICENSE](LICENSE) for details.