Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r-lum/rxylib
R package: wrapper for the C++ library `xylib`
https://github.com/r-lum/rxylib
data-import diffraction-analysis gamma-ray-spectrometry powder-diffraction r rpackage
Last synced: 4 months ago
JSON representation
R package: wrapper for the C++ library `xylib`
- Host: GitHub
- URL: https://github.com/r-lum/rxylib
- Owner: R-Lum
- License: gpl-3.0
- Created: 2017-06-27T17:34:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T23:56:49.000Z (about 1 year ago)
- Last Synced: 2024-04-23T23:37:00.035Z (10 months ago)
- Topics: data-import, diffraction-analysis, gamma-ray-spectrometry, powder-diffraction, r, rpackage
- Language: C++
- Homepage: https://r-lum.github.io/rxylib/
- Size: 85.4 MB
- Stars: 10
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS
- License: LICENSE
- Codemeta: codemeta.json
Awesome Lists containing this project
README
---
output: github_document
header-includes:
- \usepackage{amsmath}
- \usepackage{amssymb}
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
library(rxylib)
```# rxylib
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## 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
### [email protected]
### 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")
}
```