-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
147 lines (112 loc) · 5.35 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
output: github_document
header-includes:
- \usepackage{amsmath}
- \usepackage{amssymb}
---
<!-- README.md was auto-generated by README.Rmd. Please DO NOT edit by hand!-->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
library(rxylib)
```
# rxylib <img width=120px src="man/figures/rxylib.svg" align="right" />
The **R** package `rxylib` provides and access to the C++ library [xylib](https://xylib.sourceforge.net)
by wrapping the library using Rcpp. For supported data formats see https://github.com/wojdyr/xylib.
[](https://CRAN.R-project.org/package=rxylib)
[](https://www.r-pkg.org/pkg/rxylib)
[](https://github.com/R-Lum/rxylib/actions)
[](https://zenodo.org/badge/latestdoi/95584252)
[](https://doi.org/10.32614/CRAN.package.rxylib)
[](https://app.codecov.io/gh/R-Lum/rxylib)
## Installation
#### i. Requirements
* *Windows (32/64bit)*: [Rtools](https://cran.r-project.org/bin/windows/Rtools/) (provided by CRAN)
* *macOS*: [Xcode](https://developer.apple.com/xcode/)
* *Linux*: [gcc](https://gcc.gnu.org) often comes pre-installed in most distributions.
#### ii. Install the package (development version)
To install the stable version from CRAN, simply run the following from an R console:
```r
install.packages("rxylib")
```
To install the latest development builds directly from GitHub, run
```r
if(!require("devtools"))
install.packages("devtools")
devtools::install_github("R-Lum/rxylib@master")
```
To install a developer build other than `'master'`, replace the term `'master'` in the code line by the name of the wanted developer build.
## Related projects
* [rxylibShiny](https://github.com/JohannesFriedrich/rxylibShiny)
# Licenses
Please note that the package uses two different licences
## Package `rxylib` license
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[GNU General Public License](https://github.com/R-Lum/rxylib/blob/master/LICENSE) for more details.
## Library `xylib` license
The library itself is **NOT** part of the GPL-3 license conditions of the package
and available under [LGPL](https://github.com/wojdyr/xylib/blob/master/COPYING)
license conditions only cf. https://github.com/wojdyr/xylib
## <span class="glyphicon glyphicon-euro"></span> Funding
* Between 2017-2019, the work of Sebastian Kreutzer as maintainer of the package was supported
by LabEx LaScArBx (ANR - n. ANR-10-LABX-52).
* From 01/2020-04/2022, Sebastian Kreutzer received funding from the European Union’s Horizon 2020
research and innovation programme under the Marie Skłodowska-Curie grant
agreement No [844457 (project: CREDit)](https://cordis.europa.eu/project/id/844457).
* Since 03/2023, Sebastian Kreutzer as maintainer of the package receives funding from the DFG
Heisenberg programme No [505822867](https://gepris.dfg.de/gepris/projekt/505822867).
```{r, echo=FALSE}
### ==========================================================================================
### Write supported formats into the manual page
### sebastian.kreutzer@u-bordeaux-montaigne.fr
### 2019-05-08
### ==========================================================================================
##run only if not already there (otherwise we create it two time)
if(!any(
grepl(
pattern = "library version:",
x = readLines("man/rxylib-package.Rd", warn = FALSE), fixed = TRUE, useBytes = TRUE))){
## this script adds all allowed formats to the produced package manual
##get format list
formats <- rxylib:::get_supportedFormats()
##create data frame
preheader <- paste0("\\cr library version: ", rxylib:::get_version(), "\\cr\\cr")
header <- "\\tabular{lllllll}{\\bold{ID} \\tab \\bold{NAME} \\tab \\bold{DESCRIPTION} \\tab \\bold{FILE EXTENSION} \\tab \\bold{VALID_OPTIONS} \\tab \\bold{DATATYPE} \\tab \\bold{BLOCK_TYPE}\\cr"
footer <- " \\tab \\tab }"
main <- vapply(1:length(formats$name), function(x){
paste0(
"[",x,",]"," \\tab ",
formats$name[x],
" \\tab ",
formats$desc[x],
" \\tab ",
formats$exts[x],
" \\tab ",
formats$valid_options[x],
" \\tab ",
formats$binary[x],
" \\tab ",
formats$multiblock[x],
"\\cr"
)
}, vector(mode = "character", length = 1))
##table
table <- c(preheader, header, main, footer)
##read RD file
file <- readLines("man/rxylib-package.Rd")
insert_id <- grep(pattern = "Supported data formats", file, fixed = TRUE)
##output
writeLines(
text = c(file[1:insert_id], table, file[(insert_id + 1):length(file)]),
con = "man/rxylib-package.Rd")
}
```