generated from r-hyperspec/pkg-skeleton
/
hySpc-read-spc.Rmd
90 lines (74 loc) · 2.89 KB
/
hySpc-read-spc.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
---
# For vignette ---------------------------------------------------------------
title: 'Import and Export Files with SPC files'
subtitle: 'Tutorial on Spectra File Import from SPC Files for "hyperSpec"'
description: 'Tutorial on spectra file import from SPC Files for "hyperSpec".'
# Authors --------------------------------------------------------------------
author:
- name: Sang Truong, Claudia Beleites, Vilmantas Gegzna, Roman Kiselev
email: sttruong@stanford.edu
corresponding : yes
affiliation : Stanford University
# Document -------------------------------------------------------------------
date: "`r Sys.Date()`"
output:
bookdown::html_document2:
base_format: rmarkdown::html_vignette
toc: yes
toc_depth: 2
fig_caption: yes
number_sections: true
css:
- vignette.css
- style.css
vignette: >
% \VignetteIndexEntry{Introduction to Package "hySpc.read.spc"}
% \VignetteKeyword{hySpc.read.spc}
% \VignettePackage{hySpc.read.spc}
% \VignetteEngine{knitr::rmarkdown}
% \VignetteEncoding{UTF-8}
# Citations/References -------------------------------------------------------
link-citations: yes
bibliography: resources/intro-pkg.bib
biblio-style: plain
csl: elsevier-with-titles.csl
# Pkgdown --------------------------------------------------------------------
pkgdown:
as_is: true
set_null_theme: no
---
```{r cleanup-hyperspec, include = FALSE}
# Clean up to ensure reproducible workspace ----------------------------------
rm(list = ls(all.names = TRUE))
```
```{r setup, include = FALSE}
# Packages -------------------------------------------------------------------
library(hySpc.read.spc)
# Functions ------------------------------------------------------------------
source("vignette-functions.R", encoding = "UTF-8")
# Settings -------------------------------------------------------------------
source("vignette-default-settings.R", encoding = "UTF-8")
# Temporary options ----------------------------------------------------------
# Change the value of this option in "vignette-default-settings.R"
show_reviewers_notes <- getOption("show_reviewers_notes", TRUE)
```
```{r bib, echo = FALSE, paged.print = FALSE}
dir.create("resources", showWarnings = FALSE)
knitr::write_bib(
c("hyperSpec"),
file = "resources/intro-pkg.bib",
prefix = "R_"
)
```
<!-- This chunk inserts common info about all the vignettes -->
```{r, echo = FALSE, results = "asis"}
res <- knitr::knit_child("list-of-vignettes.md", quiet = TRUE)
cat(res, sep = "\n")
```
<!-- This chunk demonstrates example of read_spc()-->
```
kaisermap_path <- system.file("extdata/spc.Kaisermap", package = "hySpc.read.spc")
hySpc.read.spc::read_spc(paste0(kaisermap_path,"/ebroAVII.spc"), keys_log2data = TRUE)
labram_path <- system.file("extdata/spc.LabRam", package = "hySpc.read.spc")
hySpc.read.spc::read_spc(paste0(labram_path,"/LabRam-2.spc"))
```