This is the new home for R package hyperSpec.
Issues and feature requests should go here!
open R
and use command install.packages("hyperSpec")
. This installs the latest version available on CRAN.
-
You will need git, git-lfs and GNU make (>= 3.80)
NOTE: Windows users need to dowload and install Rtools(see this instructions).
GNU make
is included to Rtools, so you don't need to install it. See Troubleshooting below to check version ofGNU make
and update it if needed. -
Clone or download hyperSpec source code from github
git clone [email protected]:cbeleites/hyperSpec.git
- If you build hyperSpec for the first time, or run into trouble as the installed version on your computer is too old, run
make bootstrap
This will also check whether all dependencies and suggested packages (which are in fact dependencies for building) are installed and install them if not. - Execute
make install
. It creates a new tar.gz package with everything inside and installs it viaR CMD INSTALL hyperSpec_vv-date
. - Restart R to avoid trouble due to changes in the documentation data base.
NOTE: Windows users can run make
commands in R using system
: for example, system('make install')
. But be sure that your wd is set to the root directory containing Makefile
.
-
Vignette building fails and you suspect that this is due to the installed version of hyperSpec being too old.
Solution: Run
make bootstrap
to fix it. -
Vignette fileio needs lots of example files for testing import functions. These are managed by
git lfs
.Typical error: e.g. when building vignette
chondro
, import function complainsError in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', found 'version'
or in vignetteflu
:Error in .spc.filehdr(f) : Wrong spc file format version (or no spc file at all). Only 'new' spc files (1996 file format) with LSB word order are supported.
Solution: Execute
git lfs pull
to get them. -
Old versions of
GNU make
don't support order-only prerequisites (|).Typical erros:
No rule to make target '|', needed by 'fileio.pdf'. Stop.
Solution: Update version of
GNU make
. For Linux, just downloand last version from the link above. For Windows, runsystem('where make')
and replace that file by make.exe from [here] (http://www.equation.com/servlet/equation.cmd?fa=make). To check version ofGNU make
usemake -v
. -
Default language of your R enviroment is not English.
Typical error:
inputenc Error: Unicode char \u8:árq not set up for use with LaTeX
Solution: Set language of the session to English as suggested here.
-
After update to
R 3.4.0
building fails, typically on theflu
vignette.Typical error: Command
make
successfully buils a vignette and then simply stops with something likemake[1]: *** [flu.pdf] Error 1
Solution: This is a bug in R 3.4.0. Rollback to R 3.3.x or update to R 3.4.1. See Issue #45 for more details
-
Issues of versions 5.0.1 - 6.0.0(?) of roxygen2.
Typical error:
unable to find required package 'roxygen_devtest'
Solution: In order to avoid it update roxygen2 (version 6.0.1 works) or downgrade to version 5.0.1: run in R
devtools::install_version(package = 'roxygen2', version = '5.0.1')
.