Import XY-Data into R

Provides access to the 'xylib' C library for to import xy data from powder diffraction, spectroscopy and other experimental methods.

The R package rxylib provides and access to the C++ library xylib by wrapping the library using Rcpp. For supported data formats see

Rdoc CRAN Downloads Buildstatus BuildStatus CoverageStatus


i. Requirements

Windows (32/64bit) - ‘Rtools’ (provided by CRAN)

MacOSX and macOS - ‘Xcode’ (provided by Apple)

For Linux users gcc often comes pre-installed in most distributions. Should gcc be not available, however, we kindly refer to the exhaustive collection of installation guides depending on the linux distribution.

ii. Install the package

To install the stable version from CRAN, simply run the following from an R console:


To install the latest development builds directly from GitHub, run

devtools::install_github("R-Lum/[email protected]")

To install a developer build other than ‘master’, replace the term ‘master’ in the codeline by the name of the wanted developer build.

Releated projects


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 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 license conditions only cf.


rxylib 0.2.3 (Release date: 2019-04-11)

  • Set compiler flag to avoid C++ 1998 does not support 'long long' error on R-devel for Windows

rxylib 0.2.2 (Release date: 2019-04-11)

  • Update to newest 'xylib' version
  • Modify example in convert_xy2TKA() to avoid CRAN problems
  • Add
  • Switch to

rxylib 0.2.1 (Release date: 2017-12-20)

  • Add function convert_xy2TKA()
  • Reduction of the library size by stripping debug entries

rxylib 0.2.0 (Release date: 2017-07-28)

  • Add full support for file format metadata
  • Add full support for column names (R like set to V1 and V2 if not provided otherwise)
  • Add full support for block names
  • Add S3-methods for plot and print
  • Add new example dataset for a TL spectrum (XSYG-file format) and a ChiPlot (chi-file format)
  • Add internal function get_version to return the 'xylib' version number
  • Unfortunately the table with the supported file format got missing during the last update round ... again added

rxylib 0.1.1 (Release date: 2017-07-05)

  • Correct for CRAN error on Solaris platform
  • Remove import of package 'stringr'
  • Correct faulty set value for multibock (fixed by Johannes Friedrich)
  • Fix minor issue for case the data format is not obvious
  • Update to newest 'xylib' library version

rxylib 0.1.0 (Release date: 2017-06-30)

  • Initial version

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.6 by Sebastian Kreutzer, a year ago

Report a bug at

Browse source code at

Authors: Sebastian Kreutzer [aut, trl, cre] , Johannes Friedrich [aut] , RLum Team [ctb] , Marcin Wojdyr [cph] (C++ library 'xylib') , Peng Zhang [cph] (C++ library 'xylib')

Documentation:   PDF Manual  

GPL-3 | LGPL-2.1 license

Imports methods, Rcpp

Depends on utils

Suggests testthat

Linking to Rcpp, BH

Imported by gamma, powdR.

See at CRAN