Browse Source

Deploy from Github Actions build 6077821158 [ci skip]

Build URL: https://github.com/philipp-baumann/simplerspec/actions/runs/6077821158
Commit: 0817d73c18
gh-pages
Philipp Baumann 8 months ago
parent
commit
459b457292
  1. 1
      .nojekyll
  2. 1
      dev/.nojekyll
  3. 148
      dev/404.html
  4. 433
      dev/LICENSE.html
  5. 139
      dev/authors.html
  6. 378
      dev/index.html
  7. 161
      dev/news/index.html
  8. 87
      dev/pkgdown.css
  9. 4
      dev/pkgdown.js
  10. 8
      dev/pkgdown.yml
  11. 178
      dev/reference/assess_multimodels.html
  12. 170
      dev/reference/average_spc.html
  13. 170
      dev/reference/bind_lcols_dts.html
  14. 142
      dev/reference/create_vip_rects.html
  15. 183
      dev/reference/evaluate_model.html
  16. 158
      dev/reference/extract_lcols2dts.html
  17. 144
      dev/reference/extract_pls_vip.html
  18. 375
      dev/reference/fit_pls.html
  19. 298
      dev/reference/fit_rf.html
  20. 175
      dev/reference/gather_spc.html
  21. 252
      dev/reference/index.html
  22. 160
      dev/reference/join_chem_spec.html
  23. 160
      dev/reference/join_spc_chem.html
  24. 191
      dev/reference/merge_dts.html
  25. 191
      dev/reference/merge_dts_l.html
  26. 115
      dev/reference/pipe.html
  27. 217
      dev/reference/plot_pls_vip.html
  28. 272
      dev/reference/plot_spc.html
  29. 360
      dev/reference/plot_spc_ext.html
  30. 162
      dev/reference/predict_from_spc.html
  31. 168
      dev/reference/preprocess_spc.html
  32. 142
      dev/reference/read_asd.html
  33. 173
      dev/reference/read_asd_bin.html
  34. 165
      dev/reference/read_opus_bin_univ.html
  35. 172
      dev/reference/read_opus_univ.html
  36. 182
      dev/reference/remove_outliers.html
  37. 267
      dev/reference/resample_spc.html
  38. 163
      dev/reference/select_ref_spc.html
  39. 180
      dev/reference/select_spc_vars.html
  40. 184
      dev/reference/slice_xvalues.html
  41. 152
      dev/reference/split_df2l.html
  42. 12
      dev/sitemap.xml

1
.nojekyll

@ -0,0 +1 @@

1
dev/.nojekyll

@ -0,0 +1 @@

148
dev/404.html

@ -1,148 +0,0 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page not found (404) • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="https://philipp-baumann.github.io/simplerspec/bootstrap-toc.css">
<script src="https://philipp-baumann.github.io/simplerspec/bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="https://philipp-baumann.github.io/simplerspec/pkgdown.css" rel="stylesheet">
<script src="https://philipp-baumann.github.io/simplerspec/pkgdown.js"></script>
<meta property="og:title" content="Page not found (404)" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://philipp-baumann.github.io/simplerspec/index.html">simplerspec</a>
<span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.1.0.9001</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Page not found (404)</h1>
</div>
Content not found. Please use links in the navbar.
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>
</div>
</body>
</html>

433
dev/LICENSE.html

@ -1,66 +1,12 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GNU GENERAL PUBLIC LICENSE • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="bootstrap-toc.css">
<script src="bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script>
<meta property="og:title" content="GNU GENERAL PUBLIC LICENSE" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>GNU GENERAL PUBLIC LICENSE • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"><script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"><script src="pkgdown.js"></script><meta property="og:title" content="GNU GENERAL PUBLIC LICENSE"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -76,38 +22,25 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>GNU GENERAL PUBLIC LICENSE</h1>
@ -117,35 +50,30 @@
<div id="gnu-general-public-license" class="section level1">
</div>
<div id="version-3-29-june-2007" class="section level1">
<h1 class="hasAnchor">
<a href="#version-3-29-june-2007" class="anchor"></a>Version 3, 29 June 2007</h1>
<div class="section level1">
<h1 id="version-3-29-june-2007">Version 3, 29 June 2007<a class="anchor" aria-label="anchor" href="#version-3-29-june-2007"></a></h1>
<blockquote>
<p>Copyright (C) 2007 Free Software Foundation, Inc. <a href="http://fsf.org/" class="uri">http://fsf.org/</a><br>
<p>Copyright (C) 2007 Free Software Foundation, Inc. <a href="http://fsf.org/" class="external-link uri">http://fsf.org/</a><br>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
</blockquote>
</div>
<div id="preamble" class="section level1">
<h1 class="hasAnchor">
<a href="#preamble" class="anchor"></a>Preamble</h1>
<div class="section level1">
<h1 id="preamble">Preamble<a class="anchor" aria-label="anchor" href="#preamble"></a></h1>
<p>The GNU General Public License is a free, copyleft license for software and other kinds of works.</p>
<p>The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program–to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.</p>
<p>When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.</p>
<p>To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.</p>
<p>For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.</p>
<p>Developers that use the GNU GPL protect your rights with two steps:</p>
<p>(1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.</p>
<p>Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.</p>
<p>For the developers’ and authors’ protection, the GPL clearly explains that there is no warranty for this free software. For both users’ and authors’ sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.</p>
<p>Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.</p>
<p>Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.</p>
<p>The precise terms and conditions for copying, distribution and modification follow.</p>
</div>
<div id="terms-and-conditions" class="section level1">
<h1 class="hasAnchor">
<a href="#terms-and-conditions" class="anchor"></a>TERMS AND CONDITIONS</h1>
<div id="definitions-" class="section level2">
<h2 class="hasAnchor">
<a href="#definitions-" class="anchor"></a>0. Definitions.</h2>
<div class="section level1">
<h1 id="terms-and-conditions">TERMS AND CONDITIONS<a class="anchor" aria-label="anchor" href="#terms-and-conditions"></a></h1>
<div class="section level2">
<h2 id="id_0-definitions">0. Definitions.<a class="anchor" aria-label="anchor" href="#id_0-definitions"></a></h2>
<p><em>“This License”</em> refers to version 3 of the GNU General Public License.</p>
<p><em>“Copyright”</em> also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.</p>
<p><em>“The Program”</em> refers to any copyrightable work licensed under this License. Each licensee is addressed as <em>“you”</em>. <em>“Licensees”</em> and “recipients” may be individuals or organizations.</p>
@ -155,9 +83,8 @@ Everyone is permitted to copy and distribute verbatim copies of this license doc
<p>To <em>“convey”</em> a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.</p>
<p>An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.</p>
</div>
<div id="source-code-" class="section level2">
<h2 class="hasAnchor">
<a href="#source-code-" class="anchor"></a>1. Source Code.</h2>
<div class="section level2">
<h2 id="id_1-source-code">1. Source Code.<a class="anchor" aria-label="anchor" href="#id_1-source-code"></a></h2>
<p>The <em>“source code”</em> for a work means the preferred form of the work for making modifications to it. <em>“Object code”</em> means any non-source form of a work.</p>
<p>A <em>“Standard Interface”</em> means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.</p>
<p>The <em>“System Libraries”</em> of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.</p>
@ -165,95 +92,90 @@ Everyone is permitted to copy and distribute verbatim copies of this license doc
<p>The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.</p>
<p>The Corresponding Source for a work in source code form is that same work.</p>
</div>
<div id="basic-permissions-" class="section level2">
<h2 class="hasAnchor">
<a href="#basic-permissions-" class="anchor"></a>2. Basic Permissions.</h2>
<div class="section level2">
<h2 id="id_2-basic-permissions">2. Basic Permissions.<a class="anchor" aria-label="anchor" href="#id_2-basic-permissions"></a></h2>
<p>All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.</p>
<p>You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.</p>
<p>Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.</p>
</div>
<div id="protecting-users-legal-rights-from-anti-circumvention-law-" class="section level2">
<h2 class="hasAnchor">
<a href="#protecting-users-legal-rights-from-anti-circumvention-law-" class="anchor"></a>3. Protecting Users’ Legal Rights From Anti-Circumvention Law.</h2>
<div class="section level2">
<h2 id="id_3-protecting-users-legal-rights-from-anti-circumvention-law">3. Protecting Users’ Legal Rights From Anti-Circumvention Law.<a class="anchor" aria-label="anchor" href="#id_3-protecting-users-legal-rights-from-anti-circumvention-law"></a></h2>
<p>No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.</p>
<p>When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.</p>
</div>
<div id="conveying-verbatim-copies-" class="section level2">
<h2 class="hasAnchor">
<a href="#conveying-verbatim-copies-" class="anchor"></a>4. Conveying Verbatim Copies.</h2>
<div class="section level2">
<h2 id="id_4-conveying-verbatim-copies">4. Conveying Verbatim Copies.<a class="anchor" aria-label="anchor" href="#id_4-conveying-verbatim-copies"></a></h2>
<p>You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.</p>
<p>You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.</p>
</div>
<div id="conveying-modified-source-versions-" class="section level2">
<h2 class="hasAnchor">
<a href="#conveying-modified-source-versions-" class="anchor"></a>5. Conveying Modified Source Versions.</h2>
<div class="section level2">
<h2 id="id_5-conveying-modified-source-versions">5. Conveying Modified Source Versions.<a class="anchor" aria-label="anchor" href="#id_5-conveying-modified-source-versions"></a></h2>
<p>You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1">a<span class="er">)</span> The work must carry prominent notices stating that you modified</a>
<a class="sourceLine" id="cb1-2" data-line-number="2">it, and giving a relevant date.</a>
<a class="sourceLine" id="cb1-3" data-line-number="3"></a>
<a class="sourceLine" id="cb1-4" data-line-number="4">b<span class="er">)</span> The work must carry prominent notices stating that it is</a>
<a class="sourceLine" id="cb1-5" data-line-number="5">released under this License and any conditions added under section</a>
<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="fl">7.</span> This requirement modifies the requirement <span class="cf">in</span> section <span class="dv">4</span> to</a>
<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="st">"keep intact all notices"</span>.</a>
<a class="sourceLine" id="cb1-8" data-line-number="8"></a>
<a class="sourceLine" id="cb1-9" data-line-number="9">c<span class="er">)</span> You must license the entire work, as a whole, under this</a>
<a class="sourceLine" id="cb1-10" data-line-number="10">License to anyone who comes into possession of a copy. This</a>
<a class="sourceLine" id="cb1-11" data-line-number="11">License will therefore apply, along with any applicable section <span class="dv">7</span></a>
<a class="sourceLine" id="cb1-12" data-line-number="12">additional terms, to the whole of the work, and all its parts,</a>
<a class="sourceLine" id="cb1-13" data-line-number="13">regardless of how they are packaged. This License gives no</a>
<a class="sourceLine" id="cb1-14" data-line-number="14">permission to license the work <span class="cf">in</span> any other way, but it does not</a>
<a class="sourceLine" id="cb1-15" data-line-number="15">invalidate such permission <span class="cf">if</span> you have separately received it.</a>
<a class="sourceLine" id="cb1-16" data-line-number="16"></a>
<a class="sourceLine" id="cb1-17" data-line-number="17">d<span class="er">)</span> If the work has interactive user interfaces, each must display</a>
<a class="sourceLine" id="cb1-18" data-line-number="18">Appropriate Legal Notices; however, <span class="cf">if</span> the Program has interactive</a>
<a class="sourceLine" id="cb1-19" data-line-number="19">interfaces that do not display Appropriate Legal Notices, your</a>
<a class="sourceLine" id="cb1-20" data-line-number="20">work need not make them do so.</a></code></pre></div>
<div class="sourceCode" id="cb1"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>a<span class="er">)</span> The work must carry prominent notices stating that you modified</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>it, and giving a relevant date.</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a>b<span class="er">)</span> The work must carry prominent notices stating that it is</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a>released under this License and any conditions added under section</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="fl">7.</span> This requirement modifies the requirement <span class="cf">in</span> section <span class="dv">4</span> to</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="st">"keep intact all notices"</span>.</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a>c<span class="er">)</span> You must license the entire work, as a whole, under this</span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a>License to anyone who comes into possession of a copy. This</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a>License will therefore apply, along with any applicable section <span class="dv">7</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a>additional terms, to the whole of the work, and all its parts,</span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a>regardless of how they are packaged. This License gives no</span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a>permission to license the work <span class="cf">in</span> any other way, but it does not</span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a>invalidate such permission <span class="cf">if</span> you have separately received it.</span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a>d<span class="er">)</span> If the work has interactive user interfaces, each must display</span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a>Appropriate Legal Notices; however, <span class="cf">if</span> the Program has interactive</span>
<span id="cb1-19"><a href="#cb1-19" aria-hidden="true" tabindex="-1"></a>interfaces that do not display Appropriate Legal Notices, your</span>
<span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a>work need not make them do so.</span></code></pre></div>
<p>A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.</p>
</div>
<div id="conveying-non-source-forms-" class="section level2">
<h2 class="hasAnchor">
<a href="#conveying-non-source-forms-" class="anchor"></a>6. Conveying Non-Source Forms.</h2>
<div class="section level2">
<h2 id="id_6-conveying-non-source-forms">6. Conveying Non-Source Forms.<a class="anchor" aria-label="anchor" href="#id_6-conveying-non-source-forms"></a></h2>
<p>You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">a<span class="er">)</span> Convey the object code <span class="cf">in</span>, or embodied <span class="cf">in</span>, a physical product</a>
<a class="sourceLine" id="cb2-2" data-line-number="2">(including a physical distribution medium), accompanied by the</a>
<a class="sourceLine" id="cb2-3" data-line-number="3">Corresponding Source fixed on a durable physical medium</a>
<a class="sourceLine" id="cb2-4" data-line-number="4">customarily used <span class="cf">for</span> software interchange.</a>
<a class="sourceLine" id="cb2-5" data-line-number="5"></a>
<a class="sourceLine" id="cb2-6" data-line-number="6">b<span class="er">)</span> Convey the object code <span class="cf">in</span>, or embodied <span class="cf">in</span>, a physical product</a>
<a class="sourceLine" id="cb2-7" data-line-number="7">(including a physical distribution medium), accompanied by a</a>
<a class="sourceLine" id="cb2-8" data-line-number="8">written offer, valid <span class="cf">for</span> at least three years and valid <span class="cf">for</span> as</a>
<a class="sourceLine" id="cb2-9" data-line-number="9">long as you offer spare parts or customer support <span class="cf">for</span> that product</a>
<a class="sourceLine" id="cb2-10" data-line-number="10">model, to give anyone who possesses the object code <span class="kw">either</span> (<span class="dv">1</span>) a</a>
<a class="sourceLine" id="cb2-11" data-line-number="11">copy of the Corresponding Source <span class="cf">for</span> all the software <span class="cf">in</span> the</a>
<a class="sourceLine" id="cb2-12" data-line-number="12">product that is covered by this License, on a durable physical</a>
<a class="sourceLine" id="cb2-13" data-line-number="13">medium customarily used <span class="cf">for</span> software interchange, <span class="cf">for</span> a price no</a>
<a class="sourceLine" id="cb2-14" data-line-number="14">more than your reasonable cost of physically performing this</a>
<a class="sourceLine" id="cb2-15" data-line-number="15">conveying of source, <span class="kw">or</span> (<span class="dv">2</span>) access to copy the</a>
<a class="sourceLine" id="cb2-16" data-line-number="16">Corresponding Source from a network server at no charge.</a>
<a class="sourceLine" id="cb2-17" data-line-number="17"></a>
<a class="sourceLine" id="cb2-18" data-line-number="18">c<span class="er">)</span> Convey individual copies of the object code with a copy of the</a>
<a class="sourceLine" id="cb2-19" data-line-number="19">written offer to provide the Corresponding Source. This</a>
<a class="sourceLine" id="cb2-20" data-line-number="20">alternative is allowed only occasionally and noncommercially, and</a>
<a class="sourceLine" id="cb2-21" data-line-number="21">only <span class="cf">if</span> you received the object code with such an offer, <span class="cf">in</span> accord</a>
<a class="sourceLine" id="cb2-22" data-line-number="22">with subsection 6b.</a>
<a class="sourceLine" id="cb2-23" data-line-number="23"></a>
<a class="sourceLine" id="cb2-24" data-line-number="24">d<span class="er">)</span> Convey the object code by offering access from a designated</a>
<a class="sourceLine" id="cb2-25" data-line-number="25"><span class="kw">place</span> (gratis or <span class="cf">for</span> a charge), and offer equivalent access to the</a>
<a class="sourceLine" id="cb2-26" data-line-number="26">Corresponding Source <span class="cf">in</span> the same way through the same place at no</a>
<a class="sourceLine" id="cb2-27" data-line-number="27">further charge. You need not require recipients to copy the</a>
<a class="sourceLine" id="cb2-28" data-line-number="28">Corresponding Source along with the object code. If the place to</a>
<a class="sourceLine" id="cb2-29" data-line-number="29">copy the object code is a network server, the Corresponding Source</a>
<a class="sourceLine" id="cb2-30" data-line-number="30">may be on a different <span class="kw">server</span> (operated by you or a third party)</a>
<a class="sourceLine" id="cb2-31" data-line-number="31">that supports equivalent copying facilities, provided you maintain</a>
<a class="sourceLine" id="cb2-32" data-line-number="32">clear directions <span class="cf">next</span> to the object code saying where to find the</a>
<a class="sourceLine" id="cb2-33" data-line-number="33">Corresponding Source. Regardless of what server hosts the</a>
<a class="sourceLine" id="cb2-34" data-line-number="34">Corresponding Source, you remain obligated to ensure that it is</a>
<a class="sourceLine" id="cb2-35" data-line-number="35">available <span class="cf">for</span> as long as needed to satisfy these requirements.</a>
<a class="sourceLine" id="cb2-36" data-line-number="36"></a>
<a class="sourceLine" id="cb2-37" data-line-number="37">e<span class="er">)</span> Convey the object code using peer<span class="op">-</span>to<span class="op">-</span>peer transmission, provided</a>
<a class="sourceLine" id="cb2-38" data-line-number="38">you inform other peers where the object code and Corresponding</a>
<a class="sourceLine" id="cb2-39" data-line-number="39">Source of the work are being offered to the general public at no</a>
<a class="sourceLine" id="cb2-40" data-line-number="40">charge under subsection 6d.</a></code></pre></div>
<div class="sourceCode" id="cb2"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>a<span class="er">)</span> Convey the object code <span class="cf">in</span>, or embodied <span class="cf">in</span>, a physical product</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>(including a physical distribution medium), accompanied by the</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>Corresponding Source fixed on a durable physical medium</span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>customarily used <span class="cf">for</span> software interchange.</span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a>b<span class="er">)</span> Convey the object code <span class="cf">in</span>, or embodied <span class="cf">in</span>, a physical product</span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a>(including a physical distribution medium), accompanied by a</span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a>written offer, valid <span class="cf">for</span> at least three years and valid <span class="cf">for</span> as</span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a>long as you offer spare parts or customer support <span class="cf">for</span> that product</span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a>model, to give anyone who possesses the object code <span class="fu">either</span> (<span class="dv">1</span>) a</span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a>copy of the Corresponding Source <span class="cf">for</span> all the software <span class="cf">in</span> the</span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a>product that is covered by this License, on a durable physical</span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a>medium customarily used <span class="cf">for</span> software interchange, <span class="cf">for</span> a price no</span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a>more than your reasonable cost of physically performing this</span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a>conveying of source, <span class="fu">or</span> (<span class="dv">2</span>) access to copy the</span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a>Corresponding Source from a network server at no charge.</span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a>c<span class="er">)</span> Convey individual copies of the object code with a copy of the</span>
<span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a>written offer to provide the Corresponding Source. This</span>
<span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a>alternative is allowed only occasionally and noncommercially, and</span>
<span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a>only <span class="cf">if</span> you received the object code with such an offer, <span class="cf">in</span> accord</span>
<span id="cb2-22"><a href="#cb2-22" aria-hidden="true" tabindex="-1"></a>with subsection 6b.</span>
<span id="cb2-23"><a href="#cb2-23" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-24"><a href="#cb2-24" aria-hidden="true" tabindex="-1"></a>d<span class="er">)</span> Convey the object code by offering access from a designated</span>
<span id="cb2-25"><a href="#cb2-25" aria-hidden="true" tabindex="-1"></a><span class="fu">place</span> (gratis or <span class="cf">for</span> a charge), and offer equivalent access to the</span>
<span id="cb2-26"><a href="#cb2-26" aria-hidden="true" tabindex="-1"></a>Corresponding Source <span class="cf">in</span> the same way through the same place at no</span>
<span id="cb2-27"><a href="#cb2-27" aria-hidden="true" tabindex="-1"></a>further charge. You need not require recipients to copy the</span>
<span id="cb2-28"><a href="#cb2-28" aria-hidden="true" tabindex="-1"></a>Corresponding Source along with the object code. If the place to</span>
<span id="cb2-29"><a href="#cb2-29" aria-hidden="true" tabindex="-1"></a>copy the object code is a network server, the Corresponding Source</span>
<span id="cb2-30"><a href="#cb2-30" aria-hidden="true" tabindex="-1"></a>may be on a different <span class="fu">server</span> (operated by you or a third party)</span>
<span id="cb2-31"><a href="#cb2-31" aria-hidden="true" tabindex="-1"></a>that supports equivalent copying facilities, provided you maintain</span>
<span id="cb2-32"><a href="#cb2-32" aria-hidden="true" tabindex="-1"></a>clear directions <span class="cf">next</span> to the object code saying where to find the</span>
<span id="cb2-33"><a href="#cb2-33" aria-hidden="true" tabindex="-1"></a>Corresponding Source. Regardless of what server hosts the</span>
<span id="cb2-34"><a href="#cb2-34" aria-hidden="true" tabindex="-1"></a>Corresponding Source, you remain obligated to ensure that it is</span>
<span id="cb2-35"><a href="#cb2-35" aria-hidden="true" tabindex="-1"></a>available <span class="cf">for</span> as long as needed to satisfy these requirements.</span>
<span id="cb2-36"><a href="#cb2-36" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-37"><a href="#cb2-37" aria-hidden="true" tabindex="-1"></a>e<span class="er">)</span> Convey the object code using peer<span class="sc">-</span>to<span class="sc">-</span>peer transmission, provided</span>
<span id="cb2-38"><a href="#cb2-38" aria-hidden="true" tabindex="-1"></a>you inform other peers where the object code and Corresponding</span>
<span id="cb2-39"><a href="#cb2-39" aria-hidden="true" tabindex="-1"></a>Source of the work are being offered to the general public at no</span>
<span id="cb2-40"><a href="#cb2-40" aria-hidden="true" tabindex="-1"></a>charge under subsection 6d.</span></code></pre></div>
<p>A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.</p>
<p>A <em>“User Product”</em> is either (1) a <em>“consumer product”</em>, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.</p>
<p><em>“Installation Information”</em> for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.</p>
@ -261,61 +183,56 @@ Everyone is permitted to copy and distribute verbatim copies of this license doc
<p>The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.</p>
<p>Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.</p>
</div>
<div id="additional-terms-" class="section level2">
<h2 class="hasAnchor">
<a href="#additional-terms-" class="anchor"></a>7. Additional Terms.</h2>
<div class="section level2">
<h2 id="id_7-additional-terms">7. Additional Terms.<a class="anchor" aria-label="anchor" href="#id_7-additional-terms"></a></h2>
<p><em>“Additional permissions”</em> are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.</p>
<p>When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.</p>
<p>Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1">a<span class="er">)</span> Disclaiming warranty or limiting liability differently from the</a>
<a class="sourceLine" id="cb3-2" data-line-number="2">terms of sections <span class="dv">15</span> and <span class="dv">16</span> of this License; or</a>
<a class="sourceLine" id="cb3-3" data-line-number="3"></a>
<a class="sourceLine" id="cb3-4" data-line-number="4">b<span class="er">)</span> Requiring preservation of specified reasonable legal notices or</a>
<a class="sourceLine" id="cb3-5" data-line-number="5">author attributions <span class="cf">in</span> that material or <span class="cf">in</span> the Appropriate Legal</a>
<a class="sourceLine" id="cb3-6" data-line-number="6">Notices displayed by works containing it; or</a>
<a class="sourceLine" id="cb3-7" data-line-number="7"></a>
<a class="sourceLine" id="cb3-8" data-line-number="8">c<span class="er">)</span> Prohibiting misrepresentation of the origin of that material, or</a>
<a class="sourceLine" id="cb3-9" data-line-number="9">requiring that modified versions of such material be marked <span class="cf">in</span></a>
<a class="sourceLine" id="cb3-10" data-line-number="10">reasonable ways as different from the original version; or</a>
<a class="sourceLine" id="cb3-11" data-line-number="11"></a>
<a class="sourceLine" id="cb3-12" data-line-number="12">d<span class="er">)</span> Limiting the use <span class="cf">for</span> publicity purposes of names of licensors or</a>
<a class="sourceLine" id="cb3-13" data-line-number="13">authors of the material; or</a>
<a class="sourceLine" id="cb3-14" data-line-number="14"></a>
<a class="sourceLine" id="cb3-15" data-line-number="15">e<span class="er">)</span> Declining to grant rights under trademark law <span class="cf">for</span> use of some</a>
<a class="sourceLine" id="cb3-16" data-line-number="16">trade names, trademarks, or service marks; or</a>
<a class="sourceLine" id="cb3-17" data-line-number="17"></a>
<a class="sourceLine" id="cb3-18" data-line-number="18">f<span class="er">)</span> Requiring indemnification of licensors and authors of that</a>
<a class="sourceLine" id="cb3-19" data-line-number="19">material by anyone who conveys the <span class="kw">material</span> (or modified versions of</a>
<a class="sourceLine" id="cb3-20" data-line-number="20">it) with contractual assumptions of liability to the recipient, <span class="cf">for</span></a>
<a class="sourceLine" id="cb3-21" data-line-number="21">any liability that these contractual assumptions directly impose on</a>
<a class="sourceLine" id="cb3-22" data-line-number="22">those licensors and authors.</a></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>a<span class="er">)</span> Disclaiming warranty or limiting liability differently from the</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>terms of sections <span class="dv">15</span> and <span class="dv">16</span> of this License; or</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>b<span class="er">)</span> Requiring preservation of specified reasonable legal notices or</span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>author attributions <span class="cf">in</span> that material or <span class="cf">in</span> the Appropriate Legal</span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a>Notices displayed by works containing it; or</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a>c<span class="er">)</span> Prohibiting misrepresentation of the origin of that material, or</span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a>requiring that modified versions of such material be marked <span class="cf">in</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a>reasonable ways as different from the original version; or</span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a>d<span class="er">)</span> Limiting the use <span class="cf">for</span> publicity purposes of names of licensors or</span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a>authors of the material; or</span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a>e<span class="er">)</span> Declining to grant rights under trademark law <span class="cf">for</span> use of some</span>
<span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a>trade names, trademarks, or service marks; or</span>
<span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a>f<span class="er">)</span> Requiring indemnification of licensors and authors of that</span>
<span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a>material by anyone who conveys the <span class="fu">material</span> (or modified versions of</span>
<span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a>it) with contractual assumptions of liability to the recipient, <span class="cf">for</span></span>
<span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a>any liability that these contractual assumptions directly impose on</span>
<span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a>those licensors and authors.</span></code></pre></div>
<p>All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.</p>
<p>If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.</p>
<p>Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.</p>
</div>
<div id="termination-" class="section level2">
<h2 class="hasAnchor">
<a href="#termination-" class="anchor"></a>8. Termination.</h2>
<div class="section level2">
<h2 id="id_8-termination">8. Termination.<a class="anchor" aria-label="anchor" href="#id_8-termination"></a></h2>
<p>You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).</p>
<p>However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.</p>
<p>Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.</p>
<p>Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.</p>
</div>
<div id="acceptance-not-required-for-having-copies-" class="section level2">
<h2 class="hasAnchor">
<a href="#acceptance-not-required-for-having-copies-" class="anchor"></a>9. Acceptance Not Required for Having Copies.</h2>
<div class="section level2">
<h2 id="id_9-acceptance-not-required-for-having-copies">9. Acceptance Not Required for Having Copies.<a class="anchor" aria-label="anchor" href="#id_9-acceptance-not-required-for-having-copies"></a></h2>
<p>You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.</p>
</div>
<div id="automatic-licensing-of-downstream-recipients-" class="section level2">
<h2 class="hasAnchor">
<a href="#automatic-licensing-of-downstream-recipients-" class="anchor"></a>10. Automatic Licensing of Downstream Recipients.</h2>
<div class="section level2">
<h2 id="id_10-automatic-licensing-of-downstream-recipients">10. Automatic Licensing of Downstream Recipients.<a class="anchor" aria-label="anchor" href="#id_10-automatic-licensing-of-downstream-recipients"></a></h2>
<p>Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.</p>
<p>An <em>“entity transaction”</em> is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.</p>
<p>You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.</p>
</div>
<div id="patents-" class="section level2">
<h2 class="hasAnchor">
<a href="#patents-" class="anchor"></a>11. Patents.</h2>
<div class="section level2">
<h2 id="id_11-patents">11. Patents.<a class="anchor" aria-label="anchor" href="#id_11-patents"></a></h2>
<p>A <em>“contributor”</em> is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.</p>
<p>A contributor’s <em>“essential patent claims”</em> are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.</p>
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.</p>
@ -325,104 +242,92 @@ Everyone is permitted to copy and distribute verbatim copies of this license doc
<p>A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.</p>
<p>Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.</p>
</div>
<div id="no-surrender-of-others-freedom-" class="section level2">
<h2 class="hasAnchor">
<a href="#no-surrender-of-others-freedom-" class="anchor"></a>12. No Surrender of Others’ Freedom.</h2>
<div class="section level2">
<h2 id="id_12-no-surrender-of-others-freedom">12. No Surrender of Others’ Freedom.<a class="anchor" aria-label="anchor" href="#id_12-no-surrender-of-others-freedom"></a></h2>
<p>If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.</p>
</div>
<div id="use-with-the-gnu-affero-general-public-license-" class="section level2">
<h2 class="hasAnchor">
<a href="#use-with-the-gnu-affero-general-public-license-" class="anchor"></a>13. Use with the GNU Affero General Public License.</h2>
<div class="section level2">
<h2 id="id_13-use-with-the-gnu-affero-general-public-license">13. Use with the GNU Affero General Public License.<a class="anchor" aria-label="anchor" href="#id_13-use-with-the-gnu-affero-general-public-license"></a></h2>
<p>Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.</p>
</div>
<div id="revised-versions-of-this-license-" class="section level2">
<h2 class="hasAnchor">
<a href="#revised-versions-of-this-license-" class="anchor"></a>14. Revised Versions of this License.</h2>
<div class="section level2">
<h2 id="id_14-revised-versions-of-this-license">14. Revised Versions of this License.<a class="anchor" aria-label="anchor" href="#id_14-revised-versions-of-this-license"></a></h2>
<p>The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.</p>
<p>Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.</p>
<p>If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.</p>
<p>Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.</p>
</div>
<div id="disclaimer-of-warranty-" class="section level2">
<h2 class="hasAnchor">
<a href="#disclaimer-of-warranty-" class="anchor"></a>15. Disclaimer of Warranty.</h2>
<div class="section level2">
<h2 id="id_15-disclaimer-of-warranty">15. Disclaimer of Warranty.<a class="anchor" aria-label="anchor" href="#id_15-disclaimer-of-warranty"></a></h2>
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
</div>
<div id="limitation-of-liability-" class="section level2">
<h2 class="hasAnchor">
<a href="#limitation-of-liability-" class="anchor"></a>16. Limitation of Liability.</h2>
<div class="section level2">
<h2 id="id_16-limitation-of-liability">16. Limitation of Liability.<a class="anchor" aria-label="anchor" href="#id_16-limitation-of-liability"></a></h2>
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
</div>
<div id="interpretation-of-sections-15-and-16-" class="section level2">
<h2 class="hasAnchor">
<a href="#interpretation-of-sections-15-and-16-" class="anchor"></a>17. Interpretation of Sections 15 and 16.</h2>
<div class="section level2">
<h2 id="id_17-interpretation-of-sections-15-and-16">17. Interpretation of Sections 15 and 16.<a class="anchor" aria-label="anchor" href="#id_17-interpretation-of-sections-15-and-16"></a></h2>
<p>If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.</p>
</div>
<div id="end-of-terms-and-conditions" class="section level2">
<h2 class="hasAnchor">
<a href="#end-of-terms-and-conditions" class="anchor"></a># END OF TERMS AND CONDITIONS</h2>
<div class="section level2">
<h2 id="id_-end-of-terms-and-conditions"># END OF TERMS AND CONDITIONS<a class="anchor" aria-label="anchor" href="#id_-end-of-terms-and-conditions"></a></h2>
</div>
</div>
<div id="how-to-apply-these-terms-to-your-new-programs" class="section level1">
<h1 class="hasAnchor">
<a href="#how-to-apply-these-terms-to-your-new-programs" class="anchor"></a>How to Apply These Terms to Your New Programs</h1>
<div class="section level1">
<h1 id="how-to-apply-these-terms-to-your-new-programs">How to Apply These Terms to Your New Programs<a class="anchor" aria-label="anchor" href="#how-to-apply-these-terms-to-your-new-programs"></a></h1>
<p>If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.</p>
<p>To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="op">&lt;</span>one line to give the program<span class="st">'s name and a brief idea of what it does.&gt;</span></a>
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="st">Copyright (C) &lt;year&gt; &lt;name of author&gt;</span></a>
<a class="sourceLine" id="cb4-3" data-line-number="3"></a>
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="st">This program is free software: you can redistribute it and/or modify</span></a>
<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="st">it under the terms of the GNU General Public License as published by</span></a>
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="st">the Free Software Foundation, either version 3 of the License, or</span></a>
<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="st">(at your option) any later version.</span></a>
<a class="sourceLine" id="cb4-8" data-line-number="8"></a>
<a class="sourceLine" id="cb4-9" data-line-number="9"><span class="st">This program is distributed in the hope that it will be useful,</span></a>
<a class="sourceLine" id="cb4-10" data-line-number="10"><span class="st">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></a>
<a class="sourceLine" id="cb4-11" data-line-number="11"><span class="st">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></a>
<a class="sourceLine" id="cb4-12" data-line-number="12"><span class="st">GNU General Public License for more details.</span></a>
<a class="sourceLine" id="cb4-13" data-line-number="13"></a>
<a class="sourceLine" id="cb4-14" data-line-number="14"><span class="st">You should have received a copy of the GNU General Public License</span></a>
<a class="sourceLine" id="cb4-15" data-line-number="15"><span class="st">along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></a></code></pre></div>
<div class="sourceCode" id="cb4"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="sc">&lt;</span>one line to give the program<span class="st">'s name and a brief idea of what it does.&gt;</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="st">Copyright (C) &lt;year&gt; &lt;name of author&gt;</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="st">This program is free software: you can redistribute it and/or modify</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="st">it under the terms of the GNU General Public License as published by</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="st">the Free Software Foundation, either version 3 of the License, or</span></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="st">(at your option) any later version.</span></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="st">This program is distributed in the hope that it will be useful,</span></span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a><span class="st">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a><span class="st">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a><span class="st">GNU General Public License for more details.</span></span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a><span class="st">You should have received a copy of the GNU General Public License</span></span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a><span class="st">along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></span></code></pre></div>
<p>Also add information on how to contact you by electronic and paper mail.</p>
<p>If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode R"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="op">&lt;</span>program<span class="op">&gt;</span><span class="st"> </span><span class="kw">Copyright</span> (C) <span class="op">&lt;</span>year<span class="op">&gt;</span><span class="st"> </span><span class="er">&lt;</span>name of author<span class="op">&gt;</span></a>
<a class="sourceLine" id="cb5-2" data-line-number="2">This program comes with ABSOLUTELY NO WARRANTY; <span class="cf">for</span> details type <span class="st">'show w'</span>.</a>
<a class="sourceLine" id="cb5-3" data-line-number="3">This is free software, and you are welcome to redistribute it</a>
<a class="sourceLine" id="cb5-4" data-line-number="4">under certain conditions; type <span class="st">'show c'</span> <span class="cf">for</span> details.</a></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="sc">&lt;</span>program<span class="sc">&gt;</span> <span class="fu">Copyright</span> (C) <span class="sc">&lt;</span>year<span class="sc">&gt;</span> <span class="er">&lt;</span>name of author<span class="sc">&gt;</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>This program comes with ABSOLUTELY NO WARRANTY; <span class="cf">for</span> details type <span class="st">'show w'</span>.</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>This is free software, and you are welcome to redistribute it</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>under certain conditions; type <span class="st">'show c'</span> <span class="cf">for</span> details.</span></code></pre></div>
<p>The hypothetical commands <em>‘show w’</em> and <em>‘show c’</em> should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.</p>
<p>You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <a href="http://www.gnu.org/licenses/" class="uri">http://www.gnu.org/licenses/</a>.</p>
<p>The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <a href="http://www.gnu.org/philosophy/why-not-lgpl.html" class="uri">http://www.gnu.org/philosophy/why-not-lgpl.html</a>.</p>
<p>You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <a href="http://www.gnu.org/licenses/" class="external-link uri">http://www.gnu.org/licenses/</a>.</p>
<p>The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <a href="http://www.gnu.org/philosophy/why-not-lgpl.html" class="external-link uri">http://www.gnu.org/philosophy/why-not-lgpl.html</a>.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

139
dev/authors.html

@ -1,66 +1,12 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authors • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="bootstrap-toc.css">
<script src="bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script>
<meta property="og:title" content="Authors" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Authors and Citation • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"><script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"><script src="pkgdown.js"></script><meta property="og:title" content="Authors and Citation"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-authors">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container template-citation-authors">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -76,49 +22,56 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Authors</h1>
<div class="section level2 authors-section">
<div class="page-header">
<h1>Authors</h1>
</div>
<ul class="list-unstyled"><li>
<p><strong>Philipp Baumann</strong>. Author, maintainer.
</p>
</li>
</ul></div>
<div class="section level2 citation-section">
<div>
<h1 id="citation">Citation</h1>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small>
</div>
</div>
<ul class="list-unstyled">
<li>
<p><strong>Philipp Baumann</strong>. Author, maintainer.
</p>
</li>
</ul>
<p>Baumann P (2023).
<em>simplerspec: Soil and plant spectroscopic model building and prediction</em>.
R package version 0.1.0.9001, <a href="https://github.com/philipp-baumann/simplerspec" class="external-link">https://github.com/philipp-baumann/simplerspec</a>.
</p>
<pre>@Manual{,
title = {simplerspec: Soil and plant spectroscopic model building and prediction},
author = {Philipp Baumann},
year = {2023},
note = {R package version 0.1.0.9001},
url = {https://github.com/philipp-baumann/simplerspec},
}</pre>
</div>
@ -126,22 +79,20 @@
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

378
dev/index.html

@ -23,6 +23,8 @@
<![endif]-->
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-home">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@ -42,12 +44,6 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
@ -56,8 +52,8 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
@ -73,66 +69,70 @@
</header><div class="row">
<div class="contents col-md-9">
<div id="simplerspec" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#simplerspec" class="anchor"></a>simplerspec <img src="reference/figures/simplerspec-logo.png" align="right" width="250">
<div class="section level1">
<div class="page-header"><h1 id="simplerspec-">simplerspec <img src="reference/figures/simplerspec-logo.png" align="right" width="250"><a class="anchor" aria-label="anchor" href="#simplerspec-"></a>
</h1></div>
<!-- badges: start -->
<div id="short-description" class="section level2">
<h2 class="hasAnchor">
<a href="#short-description" class="anchor"></a>Short description</h2>
<p>The simplerspec package aims to facilitate spectra and additional data handling and model development for spectroscopy applications such as infrared soil spectroscopy. Different helper functions are designed to create a data and modeling workflow. Data inputs and outputs are stored in common S3 <code>R</code> objects (<code>lists</code> and <code>data frames</code>), using in addition <a href="https://rdatatable.gitlab.io/data.table/"><code>data.table</code></a> and <a href="https://tibble.tidyverse.org/index.html"><code>tibble</code></a> extensions. The functions are built to work in a pipeline and cover commonly used procedures for spectral model development and application.</p>
<div class="section level2">
<h2 id="short-description">Short description<a class="anchor" aria-label="anchor" href="#short-description"></a>
</h2>
<p>The simplerspec package aims to facilitate spectral and additional data handling and model development for spectroscopy applications such as infrared soil spectroscopy. Different helper functions are designed to create a data and modeling workflow. Data inputs and outputs are stored in common S3 <code>R</code> objects (<code>lists</code> and <code>data frames</code>), using in addition <a href="https://rdatatable.gitlab.io/data.table/" class="external-link"><code>data.table</code></a> and <a href="https://tibble.tidyverse.org/index.html" class="external-link"><code>tibble</code></a> extensions. The functions are built to work in a pipeline and cover commonly used procedures for spectral model development and application.</p>
</div>
<div id="installation" class="section level2">
<h2 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h2>
<p>The newest version of the package is available on this GitHub repository. Note that the package is still under development. If you find bugs you are highly welcome to report issues (write me an <a href="mailto:philipp.baumann@usys.ethz.ch">email</a> or create an <a href="https://github.com/philipp-baumann/simplerspec/issues">issue</a>). You can install <code>simplerspec</code> using the remotes package.</p>
<div class="sourceCode" id="cb1"><pre class="r"><span class="kw">if</span> (!<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="st">"remotes"</span>)) <span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"remotes"</span>)
<span class="kw pkg">remotes</span><span class="kw ns">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span>(<span class="st">"philipp-baumann/simplerspec"</span>)</pre></div>
<div class="section level2">
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
</h2>
<p>The newest version of the package is available on this GitHub repository. If you find bugs you are highly welcome to report issues (write me an <a href="mailto:info@spectral-cockpit.space">email</a> or create an <a href="https://github.com/philipp-baumann/simplerspec/issues" class="external-link">issue</a>). You can install {simplerspec} from GitHub or directly from the r-universe.</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># option 1</span></span>
<span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://remotes.r-lib.org" class="external-link">"remotes"</a></span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span></span>
<span><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"philipp-baumann/simplerspec"</span><span class="op">)</span></span>
<span><span class="co"># option 2</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"simplerspec"</span>,</span>
<span> repos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"https://philipp-baumann.r-universe.dev"</span>, <span class="st">"https://cloud.r-project.org"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="key-features" class="section level2">
<h2 class="hasAnchor">
<a href="#key-features" class="anchor"></a>Key features</h2>
<div class="section level2">
<h2 id="key-features">Key features<a class="anchor" aria-label="anchor" href="#key-features"></a>
</h2>
<p>The current version of the package features among others the following functions:</p>
<ol>
<ol style="list-style-type: decimal">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/read-opus-universal.R"><code><a href="reference/read_opus_univ.html">read_opus_univ()</a></code></a>: Read spectra and metadata from Bruker OPUS binary files into R list</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/read-opus-universal.R" class="external-link"><code>read_opus_univ()</code></a>: Read spectra and metadata from Bruker OPUS binary files into R list</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/gather-spc.R"><code><a href="reference/gather_spc.html">gather_spc()</a></code></a>: Gather spectra and metadata from list into a tibble object (list-columns)</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/gather-spc.R" class="external-link"><code>gather_spc()</code></a>: Gather spectra and metadata from list into a tibble object (list-columns)</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/resample-spc.R"><code><a href="reference/resample_spc.html">resample_spc()</a></code></a>: Resample spectra to new wavenumber intervals</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/resample-spc.R" class="external-link"><code>resample_spc()</code></a>: Resample spectra to new wavenumber intervals</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/average-spc.R"><code><a href="reference/average_spc.html">average_spc()</a></code></a>: Average spectra for replicate scans</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/average-spc.R" class="external-link"><code>average_spc()</code></a>: Average spectra for replicate scans</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/preprocess-spc.R"><code><a href="reference/preprocess_spc.html">preprocess_spc()</a></code></a>: Perform pre-processing of spectra</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/preprocess-spc.R" class="external-link"><code>preprocess_spc()</code></a>: Perform pre-processing of spectra</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/select-spc.R"><code><a href="reference/select_spc_vars.html">select_spc_vars()</a></code></a>: Select every <code>n</code>-th spectral variable and corresponding X-unit values.</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/select-spc.R" class="external-link"><code>select_spc_vars()</code></a>: Select every <code>n</code>-th spectral variable and corresponding X-unit values.</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/join-chem-spectra.R"><code><a href="reference/join_spc_chem.html">join_spc_chem()</a></code></a>: Join chemical and spectral data sets by <code>sample_id</code>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/join-chem-spectra.R" class="external-link"><code>join_spc_chem()</code></a>: Join chemical and spectral data sets by <code>sample_id</code>
</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/plot-spc-extended.R"><code><a href="reference/plot_spc_ext.html">plot_spc_ext()</a></code></a>: Extended spectral plotting; e.g. group spectra using different panels or color spectra based on chemical reference values to explore trends.</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/plot-spc-extended.R" class="external-link"><code>plot_spc_ext()</code></a>: Extended spectral plotting; e.g. group spectra using different panels or color spectra based on chemical reference values to explore trends.</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-modeling.R"><code><a href="reference/fit_pls.html">fit_pls()</a></code></a>: Perform model tuning and evaluation based on Partial Least Squares (PLS) regression</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-modeling.R" class="external-link"><code>fit_pls()</code></a>: Perform model tuning and evaluation based on Partial Least Squares (PLS) regression</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/select-ref-spectra.R"><code><a href="reference/select_ref_spc.html">select_ref_spc()</a></code></a>: Select a set of reference samples to measured by traditional analysis methods when no a priori sample data except spectra are available (based on Kennard-Stones sampling)</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/select-ref-spectra.R" class="external-link"><code>select_ref_spc()</code></a>: Select a set of reference samples to measured by traditional analysis methods when no a priori sample data except spectra are available (based on Kennard-Stones sampling)</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/predict-spc.R"><code><a href="reference/predict_from_spc.html">predict_from_spc()</a></code></a>: Predict multiple chemical properties from a list of calibrated models and new soil spectra</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/predict-spc.R" class="external-link"><code>predict_from_spc()</code></a>: Predict multiple chemical properties from a list of calibrated models and new soil spectra</li>
<li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/utils-stats.R"><code><a href="reference/assess_multimodels.html">assess_multimodels()</a></code></a>: Assess model performance given multiple pairs of predicted and measured variables.</li>
<a href="https://github.com/philipp-baumann/simplerspec/blob/master/R/utils-stats.R" class="external-link"><code>assess_multimodels()</code></a>: Assess model performance given multiple pairs of predicted and measured variables.</li>
</ol>
</div>
<div id="cheatsheet" class="section level2">
<h2 class="hasAnchor">
<a href="#cheatsheet" class="anchor"></a>Cheatsheet</h2>
<p><a href="https://github.com/philipp-baumann/spc-proc-concepts/blob/master/img/simplerspec_cheatsheet_crop.pdf"><img src="https://github.com/philipp-baumann/spc-proc-concepts/blob/master/img/simplerspec_cheatsheet.png" width="630"></a></p>
<div class="section level2">
<h2 id="cheatsheet">Cheatsheet<a class="anchor" aria-label="anchor" href="#cheatsheet"></a>
</h2>
<p><a href="https://github.com/philipp-baumann/spc-proc-concepts/blob/master/img/simplerspec_cheatsheet_crop.pdf" class="external-link"><img src="https://github.com/philipp-baumann/spc-proc-concepts/blob/master/img/simplerspec_cheatsheet.png" width="630"></a></p>
</div>
<div id="motivation-and-key-concepts" class="section level2">
<h2 class="hasAnchor">
<a href="#motivation-and-key-concepts" class="anchor"></a>Motivation and key concepts</h2>
<div class="section level2">
<h2 id="motivation-and-key-concepts">Motivation and key concepts<a class="anchor" aria-label="anchor" href="#motivation-and-key-concepts"></a>
</h2>
<p>Many R packages are available to do tasks in spectral modeling such as pre-processing of spectral data. The motivation to create this package was:</p>
<ol>
<ol style="list-style-type: decimal">
<li>Avoid repetition of code in model development (common source of errors).</li>
<li>Provide a reproducible data analysis workflow for FT-IR spectroscopy.</li>
<li>R packages are an ideal way to organize and share R code.</li>
@ -142,144 +142,151 @@
<p>This package builds mainly upon functions from the following R packages:</p>
<ul>
<li>
<a href="https://cran.r-project.org/web/packages/prospectr/index.html"><code>prospectr</code></a>: Various utilities for pre-processing and sample selection based on spectroscopic data. An introduction to the package with examples can be found <a href="http://antoinestevens.github.io/prospectr/">here</a>.</li>
<a href="https://cran.r-project.org/web/packages/prospectr/index.html" class="external-link"><code>prospectr</code></a>: Various utilities for pre-processing and sample selection based on spectroscopic data. An introduction to the package with examples can be found <a href="https://l-ramirez-lopez.r-universe.dev/articles/prospectr/prospectr.html" class="external-link">here</a>.</li>
<li>
<code>plyr</code> and <a href="https://dplyr.tidyverse.org/"><code>dplyr</code></a>: Fast data manipulation tools with an unified interface. See <a href="https://github.com/hadley/dplyr">here</a> for details.</li>
<code>plyr</code> and <a href="https://dplyr.tidyverse.org" class="external-link"><code>dplyr</code></a>: Fast data manipulation tools with an unified interface.</li>
<li>
<code>ggplot2</code>: Alternative plotting system for R, based on the grammar of graphics. See <a href="http://ggplot2.org/">here</a>.</li>
<code>ggplot2</code>: Alternative plotting system for R, based on the grammar of graphics. See <a href="https://ggplot2.tidyverse.org" class="external-link">here</a>.</li>
<li>
<code>caret</code>: Classification and regression training. A set of functions that attempt to streamline the process for creating predictive models. See <a href="http://topepo.github.io/caret/index.html">here</a> for details.</li>
<code>caret</code>: Classification and regression training. A set of functions that attempt to streamline the process for creating predictive models. See <a href="https://topepo.github.io/caret/" class="external-link">here</a> for details.</li>
</ul>
<p>Consistent and reproducible data and metadata management is an important prerequisite for spectral model development. Therefore, simplerspec functions are based on storing spectral data and related data in R data structures which keep related data in rows. Every row representing an observation contains data related to a single spectral measurement. Simplerspec functions uses tibble data frames as principal data structures because they allow to store lists within the well-known data frame structures. Lists are flexible data structures and can e.g. contain other lists, vectors, data.frames, or matrices.</p>
<p>List-columns features provided within the tibble framework are an excellent base to work with functional programming tools in R, which allows to efficiently write code. Simplerspec internally uses popular functional programming extension tools provided by the <a href="https://purrr.tidyverse.org/"><code>purrr</code></a> package for processing and transforming spectra. For learning more, I would recommend <a href="https://jennybc.github.io/purrr-tutorial/ls13_list-columns.html">this nice purrr list-column tutorial</a> provided by Jenny Brian. Further, simplerspec well integrates with the data processing API provided by the dplyr package, which makes spectroscopic analysis tidy and easy to understand.</p>
<p>List-columns features provided within the tibble framework are an excellent base to work with functional programming tools in R, which allows to efficiently write code. Simplerspec internally uses popular functional programming extension tools provided by the <a href="https://purrr.tidyverse.org/" class="external-link"><code>purrr</code></a> package for processing and transforming spectra. For learning more, I would recommend <a href="https://github.com/jennybc/purrr-tutorial/tree/gh-pages" class="external-link">this nice purrr list-column tutorial</a> provided by Jenny Brian. Further, simplerspec well integrates with the data processing API provided by the dplyr package, which makes spectroscopic analysis tidy and easy to understand.</p>
</div>
<div id="example-workflow" class="section level2">
<h2 class="hasAnchor">
<a href="#example-workflow" class="anchor"></a>Example workflow</h2>
<div class="section level2">
<h2 id="example-workflow">Example workflow<a class="anchor" aria-label="anchor" href="#example-workflow"></a>
</h2>
<p>Bruker FTIR spectrometers produce binary files in the OPUS format that can contain different types of spectra and many parameters such as instrument type and settings that were used at the time of data acquisition and internal processing (e.g. Fourier transform operations). Basically, the entire set of setup measurement parameters, selected spectra, supplementary metadata such as the time of measurement are written into OPUS binary files. In contrast to simple text files that contain only plain text with a defined character encoding, binary files can contain any type of data represented as sequences of bytes (a single byte is sequence of 8 bits and 1 bit either represents 0 or 1).</p>
<p>Simplerspec comes with reader function <code><a href="reference/read_opus_univ.html">read_opus_univ()</a></code> that is intended to be a universal Bruker OPUS file reader that extracts spectra and key metadata from files. Usually, one is mostly interested to extract the final absorbance spectra (shown as <em>AB</em> in the OPUS viewer software).</p>
<div class="sourceCode" id="cb2"><pre class="r"><span class="co"># Load simplerspec package for spectral model development wrapper functions</span>
<span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">simplerspec</span>)
<span class="co"># Load tidyverse packages: loads packages frequently used for data manipulation,</span>
<span class="co"># data tidying, import, and plotting</span>
<span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">tidyverse</span>)
<span class="co">################################################################################</span>
<span class="co">## Part 1: Read and pre-process spectra, read chemical data, and join</span>
<span class="co">## spectral and chemical data sets</span>
<span class="co">################################################################################</span>
<span class="co">## Read spectra in list ========================================================</span>
<span class="co"># List of OPUS binary spectra files</span>
<span class="no">lf</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.files.html">dir</a></span>(<span class="st">"data/spectra/soilspec_eth_bin"</span>, <span class="kw">full.names</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
<span class="co"># Read spectra from files into R list</span>
<span class="no">spc_list</span> <span class="kw">&lt;-</span> <span class="fu"><a href="reference/read_opus_univ.html">read_opus_univ</a></span>(<span class="kw">fnames</span> <span class="kw">=</span> <span class="no">lf</span>, <span class="kw">extract</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"spc"</span>))
<span class="co"># Returns messages:</span>
<span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_01_soil_cal.0&gt;</span>
<span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_01_soil_cal.1&gt;</span>
<span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_01_soil_cal.2&gt;</span>
<span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_02_soil_cal.0&gt;</span>
<span class="co">#&gt; ...</span></pre></div>
<p>Pipes can make R code more readable and allows step-wise data processing when developing spectral models. The pipe operator (<code><a href="reference/pipe.html">%&gt;%</a></code>, called “then”) is a new operator in R that was introduced with the magrittr package. It facilitates readability of code and avoids to type intermediate objects. The basic behavior of the pipe operator is that the object on the left hand side is passed as the first argument to the function on the right hand side. When loading the tidyverse packages, the pipe operator is attached to the current R session. More details can be found <a href="https://github.com/smbache/magrittr">here</a>.</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Load simplerspec package for spectral model development wrapper functions</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/philipp-baumann/simplerspec" class="external-link">simplerspec</a></span><span class="op">)</span></span>
<span><span class="co"># Load tidyverse packages: loads packages frequently used for data manipulation,</span></span>
<span><span class="co"># data tidying, import, and plotting</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://tidyverse.tidyverse.org" class="external-link">tidyverse</a></span><span class="op">)</span></span>
<span></span>
<span><span class="co">################################################################################</span></span>
<span><span class="co">## Part 1: Read and pre-process spectra, read chemical data, and join</span></span>
<span><span class="co">## spectral and chemical data sets</span></span>
<span><span class="co">################################################################################</span></span>
<span></span>
<span><span class="co">## Read spectra in list ========================================================</span></span>
<span></span>
<span><span class="co"># List of OPUS binary spectra files</span></span>
<span><span class="va">lf</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.files.html" class="external-link">dir</a></span><span class="op">(</span><span class="st">"data/spectra/soilspec_eth_bin"</span>, full.names <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Read spectra from files into R list</span></span>
<span><span class="va">spc_list</span> <span class="op">&lt;-</span> <span class="fu"><a href="reference/read_opus_univ.html">read_opus_univ</a></span><span class="op">(</span>fnames <span class="op">=</span> <span class="va">lf</span>, extract <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"spc"</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co"># Returns messages:</span></span>
<span><span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_01_soil_cal.0&gt;</span></span>
<span><span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_01_soil_cal.1&gt;</span></span>
<span><span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_01_soil_cal.2&gt;</span></span>
<span><span class="co">#&gt; Extracted spectra data from file: &lt;BF_lo_02_soil_cal.0&gt;</span></span>
<span><span class="co">#&gt; ...</span></span></code></pre></div>
<p>Pipes can make R code more readable and allows step-wise data processing when developing spectral models. The pipe operator (<code>%&gt;%</code>, called “then”) is a new operator in R that was introduced with the magrittr package. It facilitates readability of code and avoids to type intermediate objects. The basic behavior of the pipe operator is that the object on the left hand side is passed as the first argument to the function on the right hand side. When loading the tidyverse packages, the pipe operator is attached to the current R session. More details can be found <a href="https://magrittr.tidyverse.org" class="external-link">here</a>.</p>
<p>The model development process can be quickly coded as the example below illustrates:</p>
<div class="sourceCode" id="cb3"><pre class="r"><span class="co">## Spectral data processing pipe ===============================================</span>
<span class="no">soilspec_tbl</span> <span class="kw">&lt;-</span> <span class="no">spc_list</span> <span class="kw">%&gt;%</span>
<span class="co"># Gather list of spectra data into tibble data frame</span>
<span class="fu"><a href="reference/gather_spc.html">gather_spc</a></span>() <span class="kw">%&gt;%</span>
<span class="co"># Resample spectra to new wavenumber interval</span>
<span class="fu"><a href="reference/resample_spc.html">resample_spc</a></span>(<span class="kw">wn_lower</span> <span class="kw">=</span> <span class="fl">500</span>, <span class="kw">wn_upper</span> <span class="kw">=</span> <span class="fl">3996</span>, <span class="kw">wn_interval</span> <span class="kw">=</span> <span class="fl">2</span>) <span class="kw">%&gt;%</span>
<span class="co"># Average replicate scans per sample_id</span>
<span class="fu"><a href="reference/average_spc.html">average_spc</a></span>() <span class="kw">%&gt;%</span>
<span class="co"># Preprocess spectra using Savitzky-Golay first derivative with a window size</span>
<span class="co"># of 21 points</span>
<span class="fu"><a href="reference/preprocess_spc.html">preprocess_spc</a></span>(<span class="kw">select</span> <span class="kw">=</span> <span class="st">"sg_1_w21"</span>)
<span class="no">soilspec_tbl</span>
<span class="co"># A tibble: 284 x 11</span>
<span class="co">#&gt; unique_id file_id sample_id</span>
<span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;</span>
<span class="co">#&gt; 1 BF_lo_01_soil_cal.0_2015-11-06 14:34:10 BF_lo_01_soil_cal.0 BF_lo_01_soil_cal</span>
<span class="co">#&gt; 2 BF_lo_01_soil_cal.1_2015-11-06 14:38:14 BF_lo_01_soil_cal.1 BF_lo_01_soil_cal</span>
<span class="co">#&gt; 3 BF_lo_01_soil_cal.2_2015-11-06 14:40:55 BF_lo_01_soil_cal.2 BF_lo_01_soil_cal</span>
<span class="co">#&gt; 4 BF_lo_02_soil_cal.0_2015-11-06 17:27:55 BF_lo_02_soil_cal.0 BF_lo_02_soil_cal</span>
<span class="co">#&gt; 5 BF_lo_02_soil_cal.1_2015-11-06 17:30:19 BF_lo_02_soil_cal.1 BF_lo_02_soil_cal</span>
<span class="co">#&gt; 6 BF_lo_02_soil_cal.2_2015-11-06 17:32:47 BF_lo_02_soil_cal.2 BF_lo_02_soil_cal</span>
<span class="co">#&gt; 7 BF_lo_03_soil_cal.0_2015-11-09 11:32:55 BF_lo_03_soil_cal.0 BF_lo_03_soil_cal</span>
<span class="co">#&gt; 8 BF_lo_03_soil_cal.1_2015-11-09 11:35:26 BF_lo_03_soil_cal.1 BF_lo_03_soil_cal</span>
<span class="co">#&gt; 9 BF_lo_03_soil_cal.2_2015-11-09 11:38:08 BF_lo_03_soil_cal.2 BF_lo_03_soil_cal</span>
<span class="co">#&gt; 10 BF_lo_04_soil_cal.0_2015-11-06 10:36:13 BF_lo_04_soil_cal.0 BF_lo_04_soil_cal</span>
<span class="co">#&gt; # ... with 274 more rows, and 8 more variables: spc &lt;list&gt;, wavenumbers &lt;list&gt;,</span>
<span class="co">#&gt; # metadata &lt;list&gt;, spc_rs &lt;list&gt;, wavenumbers_rs &lt;list&gt;, spc_mean &lt;list&gt;,</span>
<span class="co">#&gt; # spc_pre &lt;list&gt;, xvalues_pre &lt;list&gt;</span>
<span class="co">## Read chemical reference data and join with spectral data ====================</span>
<span class="co"># Read chemical reference analysis data</span>
<span class="no">soilchem_tbl</span> <span class="kw">&lt;-</span> <span class="fu">read_csv</span>(<span class="kw">file</span> <span class="kw">=</span> <span class="st">"data/soilchem/soilchem_yamsys.csv"</span>)
<span class="co">#&gt; Parsed with column specification:</span>
<span class="co">#&gt; cols(</span>
<span class="co">#&gt; .default = col_double(),</span>
<span class="co">#&gt; sample_ID = col_character(),</span>
<span class="co">#&gt; country = col_character(),</span>
<span class="co">#&gt; site = col_character(),</span>
<span class="co">#&gt; material = col_character(),</span>
<span class="co">#&gt; site_comb = col_character()</span>
<span class="co">#&gt; )</span>
<span class="co">#&gt; See spec(...) for full column specifications.</span>
<span class="co"># Join spectra tibble and chemical reference analysis tibble</span>
<span class="no">spec_chem</span> <span class="kw">&lt;-</span> <span class="fu"><a href="reference/join_spc_chem.html">join_spc_chem</a></span>(
<span class="kw">spc_tbl</span> <span class="kw">=</span> <span class="no">soilspec_tbl</span>, <span class="kw">chem_tbl</span> <span class="kw">=</span> <span class="no">soilchem_tbl</span>, <span class="kw">by</span> <span class="kw">=</span> <span class="st">"sample_id"</span>)
<span class="co">#&gt; Joining, by = "sample_id"</span>
<span class="co">################################################################################</span>
<span class="co">## Part 2: Run PLS regression models for different soil variables</span>
<span class="co">################################################################################</span>
<span class="co"># Example Partial Least Squares (PLS) Regression model for total Carbon (C)</span>
<span class="co"># Use repeated k-fold cross-validation to tune the model (choose optimal </span>
<span class="co"># number of PLS components) and estimate model performance on hold-out </span>
<span class="co"># predictions of the finally chosen model (model assessment).</span>
<span class="co"># This allows to use the entire set for both model building and evaluation;</span>
<span class="co"># recommended for small data sets</span>
<span class="no">pls_C</span> <span class="kw">&lt;-</span> <span class="fu"><a href="reference/fit_pls.html">fit_pls</a></span>(
<span class="co"># remove rows with NA in the data</span>
<span class="kw">spec_chem</span> <span class="kw">=</span> <span class="no">spec_chem</span>[!<span class="fu"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span>(<span class="no">spec_chem</span>$<span class="no">C</span>), ],
<span class="kw">response</span> <span class="kw">=</span> <span class="no">C</span>,
<span class="kw">evaluation_method</span> <span class="kw">=</span> <span class="st">"resampling"</span>,
<span class="kw">tuning_method</span> <span class="kw">=</span> <span class="st">"resampling"</span>,
<span class="kw">resampling_method</span> <span class="kw">=</span> <span class="st">"rep_kfold_cv"</span>,
<span class="kw">pls_ncomp_max</span> <span class="kw">=</span> <span class="fl">7</span> <span class="co"># maximum number of PLS components tested during tuning</span>
)</pre></div>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co">## Spectral data processing pipe ===============================================</span></span>
<span></span>
<span><span class="va">soilspec_tbl</span> <span class="op">&lt;-</span> <span class="va">spc_list</span> <span class="op"><a href="reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="co"># Gather list of spectra data into tibble data frame</span></span>
<span> <span class="fu"><a href="reference/gather_spc.html">gather_spc</a></span><span class="op">(</span><span class="op">)</span> <span class="op"><a href="reference/pipe.html">%&gt;%</a></span> </span>
<span> <span class="co"># Resample spectra to new wavenumber interval</span></span>
<span> <span class="fu"><a href="reference/resample_spc.html">resample_spc</a></span><span class="op">(</span>wn_lower <span class="op">=</span> <span class="fl">500</span>, wn_upper <span class="op">=</span> <span class="fl">3996</span>, wn_interval <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="op"><a href="reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="co"># Average replicate scans per sample_id</span></span>
<span> <span class="fu"><a href="reference/average_spc.html">average_spc</a></span><span class="op">(</span><span class="op">)</span> <span class="op"><a href="reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="co"># Preprocess spectra using Savitzky-Golay first derivative with a window size</span></span>
<span> <span class="co"># of 21 points</span></span>
<span> <span class="fu"><a href="reference/preprocess_spc.html">preprocess_spc</a></span><span class="op">(</span>select <span class="op">=</span> <span class="st">"sg_1_w21"</span><span class="op">)</span></span>
<span> </span>
<span><span class="va">soilspec_tbl</span></span>
<span><span class="co"># A tibble: 284 x 11</span></span>
<span><span class="co">#&gt; unique_id file_id sample_id</span></span>
<span><span class="co">#&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;</span></span>
<span><span class="co">#&gt; 1 BF_lo_01_soil_cal.0_2015-11-06 14:34:10 BF_lo_01_soil_cal.0 BF_lo_01_soil_cal</span></span>
<span><span class="co">#&gt; 2 BF_lo_01_soil_cal.1_2015-11-06 14:38:14 BF_lo_01_soil_cal.1 BF_lo_01_soil_cal</span></span>
<span><span class="co">#&gt; 3 BF_lo_01_soil_cal.2_2015-11-06 14:40:55 BF_lo_01_soil_cal.2 BF_lo_01_soil_cal</span></span>
<span><span class="co">#&gt; 4 BF_lo_02_soil_cal.0_2015-11-06 17:27:55 BF_lo_02_soil_cal.0 BF_lo_02_soil_cal</span></span>
<span><span class="co">#&gt; 5 BF_lo_02_soil_cal.1_2015-11-06 17:30:19 BF_lo_02_soil_cal.1 BF_lo_02_soil_cal</span></span>
<span><span class="co">#&gt; 6 BF_lo_02_soil_cal.2_2015-11-06 17:32:47 BF_lo_02_soil_cal.2 BF_lo_02_soil_cal</span></span>
<span><span class="co">#&gt; 7 BF_lo_03_soil_cal.0_2015-11-09 11:32:55 BF_lo_03_soil_cal.0 BF_lo_03_soil_cal</span></span>
<span><span class="co">#&gt; 8 BF_lo_03_soil_cal.1_2015-11-09 11:35:26 BF_lo_03_soil_cal.1 BF_lo_03_soil_cal</span></span>
<span><span class="co">#&gt; 9 BF_lo_03_soil_cal.2_2015-11-09 11:38:08 BF_lo_03_soil_cal.2 BF_lo_03_soil_cal</span></span>
<span><span class="co">#&gt; 10 BF_lo_04_soil_cal.0_2015-11-06 10:36:13 BF_lo_04_soil_cal.0 BF_lo_04_soil_cal</span></span>
<span><span class="co">#&gt; # ... with 274 more rows, and 8 more variables: spc &lt;list&gt;, wavenumbers &lt;list&gt;,</span></span>
<span><span class="co">#&gt; # metadata &lt;list&gt;, spc_rs &lt;list&gt;, wavenumbers_rs &lt;list&gt;, spc_mean &lt;list&gt;,</span></span>
<span><span class="co">#&gt; # spc_pre &lt;list&gt;, xvalues_pre &lt;list&gt;</span></span>
<span> </span>
<span></span>
<span><span class="co">## Read chemical reference data and join with spectral data ====================</span></span>
<span></span>
<span><span class="co"># Read chemical reference analysis data</span></span>
<span><span class="va">soilchem_tbl</span> <span class="op">&lt;-</span> <span class="fu">read_csv</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"data/soilchem/soilchem_yamsys.csv"</span><span class="op">)</span></span>
<span><span class="co">#&gt; Parsed with column specification:</span></span>
<span><span class="co">#&gt; cols(</span></span>
<span><span class="co">#&gt; .default = col_double(),</span></span>
<span><span class="co">#&gt; sample_ID = col_character(),</span></span>
<span><span class="co">#&gt; country = col_character(),</span></span>
<span><span class="co">#&gt; site = col_character(),</span></span>
<span><span class="co">#&gt; material = col_character(),</span></span>
<span><span class="co">#&gt; site_comb = col_character()</span></span>
<span><span class="co">#&gt; )</span></span>
<span><span class="co">#&gt; See spec(...) for full column specifications.</span></span>
<span></span>
<span><span class="co"># Join spectra tibble and chemical reference analysis tibble</span></span>
<span><span class="va">spec_chem</span> <span class="op">&lt;-</span> <span class="fu"><a href="reference/join_spc_chem.html">join_spc_chem</a></span><span class="op">(</span></span>
<span> spc_tbl <span class="op">=</span> <span class="va">soilspec_tbl</span>, chem_tbl <span class="op">=</span> <span class="va">soilchem_tbl</span>, by <span class="op">=</span> <span class="st">"sample_id"</span><span class="op">)</span></span>
<span><span class="co">#&gt; Joining, by = "sample_id"</span></span>
<span></span>
<span><span class="co">################################################################################</span></span>
<span><span class="co">## Part 2: Run PLS regression models for different soil variables</span></span>
<span><span class="co">################################################################################</span></span>
<span></span>
<span><span class="co"># Example Partial Least Squares (PLS) Regression model for total Carbon (C)</span></span>
<span><span class="co"># Use repeated k-fold cross-validation to tune the model (choose optimal </span></span>
<span><span class="co"># number of PLS components) and estimate model performance on hold-out </span></span>
<span><span class="co"># predictions of the finally chosen model (model assessment).</span></span>
<span><span class="co"># This allows to use the entire set for both model building and evaluation;</span></span>
<span><span class="co"># recommended for small data sets</span></span>
<span><span class="va">pls_C</span> <span class="op">&lt;-</span> <span class="fu"><a href="reference/fit_pls.html">fit_pls</a></span><span class="op">(</span></span>
<span> <span class="co"># remove rows with NA in the data</span></span>
<span> spec_chem <span class="op">=</span> <span class="va">spec_chem</span><span class="op">[</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NA.html" class="external-link">is.na</a></span><span class="op">(</span><span class="va">spec_chem</span><span class="op">$</span><span class="va">C</span><span class="op">)</span>, <span class="op">]</span>,</span>
<span> response <span class="op">=</span> <span class="va">C</span>,</span>
<span> evaluation_method <span class="op">=</span> <span class="st">"resampling"</span>,</span>
<span> tuning_method <span class="op">=</span> <span class="st">"resampling"</span>,</span>
<span> resampling_method <span class="op">=</span> <span class="st">"rep_kfold_cv"</span>,</span>
<span> pls_ncomp_max <span class="op">=</span> <span class="fl">7</span> <span class="co"># maximum number of PLS components tested during tuning</span></span>
<span><span class="op">)</span> </span></code></pre></div>
</div>
<div id="projects-using-simplerspec" class="section level2">
<h2 class="hasAnchor">
<a href="#projects-using-simplerspec" class="anchor"></a>Projects using simplerspec</h2>
<div class="section level2">
<h2 id="projects-using-simplerspec">Projects using simplerspec<a class="anchor" aria-label="anchor" href="#projects-using-simplerspec"></a>
</h2>
<ul>
<li><a href="https://sae-interactive-data.ethz.ch/simplerspec.drc/">Spectral platform for soil samples of the Democratic Republic of Congo</a></li>
<li><a href="https://sae-interactive-data.ethz.ch/simplerspec.drc/" class="external-link">Spectral platform for soil samples of the Democratic Republic of Congo</a></li>
</ul>
</div>
<div id="package-help" class="section level2">
<h2 class="hasAnchor">
<a href="#package-help" class="anchor"></a>Package help</h2>
<div class="section level2">
<h2 id="package-help">Package help<a class="anchor" aria-label="anchor" href="#package-help"></a>
</h2>
<p>After successfully installing simplerspec, you can use the R build-in help using <code>?simplerspec::&lt;fun_name&gt;</code></p>
</div>
<div id="credits" class="section level2">
<h2 class="hasAnchor">
<a href="#credits" class="anchor"></a>Credits</h2>
<div class="section level2">
<h2 id="like-it">Like it?<a class="anchor" aria-label="anchor" href="#like-it"></a>
</h2>
<p><a href="https://www.buymeacoffee.com/specphil" class="external-link"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="“Buy Me A Coffee”"></a></p>
</div>
<div class="section level2">
<h2 id="credits">Credits<a class="anchor" aria-label="anchor" href="#credits"></a>
</h2>
<p>I would like to thank the following people for the inspiration by concepts, code and packages:</p>
<ul>
<li>Antoine Stevens and Leonardo Ramirez-Lopez for their contributions to the <a href="https://cran.r-project.org/web/packages/prospectr/index.html">prospectr package</a> and the <em>Guide to Diffuse Reflectance Spectroscopy &amp; Multivariate Calibration</em>
<li>Antoine Stevens and Leonardo Ramirez-Lopez for their contributions to the <a href="https://l-ramirez-lopez.r-universe.dev/prospectr" class="external-link">prospectr package</a> and the <em>Guide to Diffuse Reflectance Spectroscopy &amp; Multivariate Calibration</em>
</li>
<li>Andrew Sila, Tomislav Hengl, and Thomas Terhoeven-Urselmans for the <a href="https://github.com/cran/soil.spec/blob/master/R/read.opus.R"><code>read.opus()</code></a> function from the <a href="https://cran.r-project.org/web/packages/soil.spec/index.html">soil.spec</a> package developed at ICRAF.</li>
<li>Andrew Sila, Tomislav Hengl, and Thomas Terhoeven-Urselmans for the <a href="https://github.com/cran/soil.spec/blob/master/R/read.opus.R" class="external-link"><code>read.opus()</code></a> function from the <a href="https://cran.r-project.org/src/contrib/Archive/soil.spec/" class="external-link">soil.spec</a> package developed at ICRAF.</li>
<li>
<a href="http://hadley.nz/">Hadley Wickham</a> for his work and concepts on data science within R</li>
<a href="https://hadley.nz" class="external-link">Hadley Wickham</a> for his work and concepts on data science within R</li>
<li>
<a href="https://github.com/topepo">Max Kuhn</a> for the creation of the caret package and for his excellent teaching materials on <a href="http://appliedpredictivemodeling.com/blog/">applied predictive modeling</a>
<a href="https://github.com/topepo" class="external-link">Max Kuhn</a> for the creation of the caret package and for his excellent teaching materials on <a href="https://link.springer.com/book/10.1007/978-1-4614-6849-3" class="external-link">applied predictive modeling</a>
</li>
</ul>
</div>
@ -288,46 +295,57 @@
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<div class="links">
<h2>Links</h2>
<h2 data-toc-skip>Links</h2>
<ul class="list-unstyled">
<li>Browse source code at <br><a href="https://github.com/philipp-baumann/simplerspec/">https://​github.com/​philipp-baumann/​simplerspec/​</a>
</li>
<li>Report a bug at <br><a href="https://github.com/philipp-baumann/simplerspec">https://​github.com/​philipp-baumann/​simplerspec</a>
</li>
<li><a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">Browse source code</a></li>
<li><a href="https://github.com/philipp-baumann/simplerspec" class="external-link">Report a bug</a></li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<h2 data-toc-skip>License</h2>
<ul class="list-unstyled">
<li><a href="LICENSE.html">Full license</a></li>
<li><small><a href="https://www.r-project.org/Licenses/GPL-2">GPL-2</a></small></li>
<li><small><a href="https://www.r-project.org/Licenses/GPL-2" class="external-link">GPL-2</a></small></li>
</ul>
</div>
<div class="citation">
<h2 data-toc-skip>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html#citation">Citing simplerspec</a></li>
</ul>
</div>
<div class="developers">
<h2>Developers</h2>
<h2 data-toc-skip>Developers</h2>
<ul class="list-unstyled">
<li>Philipp Baumann <br><small class="roles"> Author, maintainer </small> </li>
</ul>
</div>
<div class="dev-status">
<h2>Dev status</h2>
<div class="dev-status">
<h2 data-toc-skip>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://travis-ci.org/philipp-baumann/simplerspec"><img src="https://travis-ci.org/philipp-baumann/simplerspec.svg?branch=master" alt="Travis Build Status"></a></li>
<li><a href="https://ci.appveyor.com/project/philipp-baumann/simplerspec"><img src="https://ci.appveyor.com/api/projects/status/github/philipp-baumann/simplerspec?branch=master&amp;svg=true" alt="AppVeyor Build Status"></a></li>
<li><a href="https://zenodo.org/badge/latestdoi/67121732"><img src="https://zenodo.org/badge/67121732.svg" alt="DOI"></a></li>
<li><a href="https://zenodo.org/badge/latestdoi/67121732" class="external-link"><img src="https://zenodo.org/badge/67121732.svg" alt="DOI"></a></li>
<li><a href="https://opensource.org/licenses/MIT" class="external-link"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a></li>
<li><a href="https://philipp-baumann.r-universe.dev/simplerspec" class="external-link"><img src="https://philipp-baumann.r-universe.dev/badges/simplerspec?scale=1&amp;color=pink&amp;style=round" alt="runiverse-package simplerspec"></a></li>
</ul>
</div>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Philipp Baumann.</p>
<p></p>
<p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
@ -336,5 +354,7 @@
</body>
</html>

161
dev/news/index.html

@ -1,66 +1,12 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changelog • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Changelog" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Changelog • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Changelog"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-news">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -76,109 +22,78 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1 data-toc-skip>Changelog <small></small></h1>
<small>Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
<small>Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
</div>
<div id="simplerspec-0-1-0-9001" class="section level1">
<h1 class="page-header" data-toc-text="0.1.0.9001">
<a href="#simplerspec-0-1-0-9001" class="anchor"></a>simplerspec 0.1.0.9001</h1>
<ul>
<li>
<code><a href="../reference/resample_spc.html">resample_spc()</a></code> now supports flexible spectra and x-axis types as inputs. Its interface has been carefully augmented without breaking previous functionality (<a href="https://github.com/philipp-baumann/simplerspec/issues/9"><a href='https://github.com/philipp-baumann/simplerspec/issues/9'>#9</a></a>
<ul>
<li>New argument <code>column_in</code> specifies the string or name (unquoting support) of the input column that contains the list of spectra. The following spectrum types, which are automatically matched against the list-column that contains the corresponding x-unit value vectors, are currently supported: <code>spc</code> (raw or unprocessed spectra), <code>spc_rs</code> (resampled spectra), <code>spc_mean</code> (mean spectra), <code>spc_nocomp</code> (spectra prior atmospheric compensation), <code>sc_sm</code> (single channel sample spectra), <code>sc_rf</code> (single channel reference spectra), <code>spc_pre</code> (preprocessed spectra).</li>
<div class="section level2">
<h2 class="page-header" data-toc-text="0.1.0.9001" id="simplerspec-0109001">simplerspec 0.1.0.9001<a class="anchor" aria-label="anchor" href="#simplerspec-0109001"></a></h2>
<ul><li>
<code><a href="../reference/resample_spc.html">resample_spc()</a></code> now supports flexible spectra and x-axis types as inputs. Its interface has been carefully augmented without breaking previous functionality (<a href="https://github.com/philipp-baumann/simplerspec/issues/9" class="external-link">#9</a>
<ul><li>New argument <code>column_in</code> specifies the string or name (unquoting support) of the input column that contains the list of spectra. The following spectrum types, which are automatically matched against the list-column that contains the corresponding x-unit value vectors, are currently supported: <code>spc</code> (raw or unprocessed spectra), <code>spc_rs</code> (resampled spectra), <code>spc_mean</code> (mean spectra), <code>spc_nocomp</code> (spectra prior atmospheric compensation), <code>sc_sm</code> (single channel sample spectra), <code>sc_rf</code> (single channel reference spectra), <code>spc_pre</code> (preprocessed spectra).</li>
<li>New argument <code>interpol_method</code> specifying the interpolation method is introduced. Default is <code>"linear"</code> to achieve identical results with both prospectr v0.1.0 and v0.2.0. The current CRAN prospectr v0.2.0 has changed the default of <code>interpol</code> to <code>"spline"</code>. The previous <code><a href="../reference/resample_spc.html">resample_spc()</a></code> unfortunatelty did not explicitly state the method internally, and relied on the default instead. The measures taken ensure downward compatibility of <code><a href="../reference/resample_spc.html">resample_spc()</a></code> with previous versions of prospectr and simplerspec.</li>
<li>The arguments gain more defensive checks inside the function (supplied types and presence of objects in spectra).</li>
<li>The function components and the help are updated accordingly. Clearer vocabulary to describe the functionality and more consistent terminology for physical quantities and R objects are used.</li>
</ul>
</li>
</ul></li>
<li>Add UTF-8 support to DESCRIPTION because roxygen2 version 7.1.0 requires it.</li>
</ul>
</div>
<div id="simplerspec-0-1-0-9000" class="section level1">
<h1 class="page-header" data-toc-text="0.1.0.9000">
<a href="#simplerspec-0-1-0-9000" class="anchor"></a>simplerspec 0.1.0.9000</h1>
<ul>
<li>Start using Kirill’s <code>{fledge}</code> for tracking and communicating the simplerspec development process in <code>NEWS</code>.</li>
</ul>
</div>
<div id="simplerspec-0-1-0" class="section level1">
<h1 class="page-header" data-toc-text="0.1.0">
<a href="#simplerspec-0-1-0" class="anchor"></a>simplerspec 0.1.0</h1>
<ul>
<li>Added a <code>NEWS.md</code> file to track changes to the package</li>
</ul>
</div>
<div id="simplerspec-0-1-0-1" class="section level1">
<h1 class="page-header" data-toc-text="0.1.0.1">
<a href="#simplerspec-0-1-0-1" class="anchor"></a>simplerspec 0.1.0.1</h1>
<ul>
<li>
</ul></div>
<div class="section level2">
<h2 class="page-header" data-toc-text="0.1.0.9000" id="simplerspec-0109000">simplerspec 0.1.0.9000<a class="anchor" aria-label="anchor" href="#simplerspec-0109000"></a></h2>
<ul><li>Start using Kirill’s <a href="https://fledge.cynkra.com/" class="external-link">fledge</a> for tracking and communicating the simplerspec development process in <code>NEWS</code>.</li>
</ul></div>
<div class="section level2">
<h2 class="page-header" data-toc-text="0.1.0" id="simplerspec-010">simplerspec 0.1.0<a class="anchor" aria-label="anchor" href="#simplerspec-010"></a></h2>
<ul><li>Added a <code>NEWS.md</code> file to track changes to the package</li>
</ul></div>
<div class="section level2">
<h2 class="page-header" data-toc-text="0.1.0.1" id="simplerspec-0101">simplerspec 0.1.0.1<a class="anchor" aria-label="anchor" href="#simplerspec-0101"></a></h2>
<ul><li>
<code><a href="../reference/read_opus_bin_univ.html">read_opus_bin_univ()</a></code>: Add support for Bruker files that have undefined <code>PLF</code> value (<code>:= NULL</code>)</li>
</ul>
</div>
</ul></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

87
dev/pkgdown.css

@ -56,8 +56,10 @@ img.icon {
float: right;
}
img {
/* Ensure in-page images don't run outside their container */
.contents img {
max-width: 100%;
height: auto;
}
/* Fix bug in bootstrap (only seen in firefox) */
@ -78,11 +80,10 @@ dd {
/* Section anchors ---------------------------------*/
a.anchor {
margin-left: -30px;
display:inline-block;
width: 30px;
height: 30px;
visibility: hidden;
display: none;
margin-left: 5px;
width: 20px;
height: 20px;
background-image: url(./link.svg);
background-repeat: no-repeat;
@ -90,17 +91,15 @@ a.anchor {
background-position: center center;
}
.hasAnchor:hover a.anchor {
visibility: visible;
}
@media (max-width: 767px) {
.hasAnchor:hover a.anchor {
visibility: hidden;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
display: inline-block;
}
/* Fixes for fixed navbar --------------------------*/
.contents h1, .contents h2, .contents h3, .contents h4 {
@ -244,14 +243,14 @@ nav[data-toggle='toc'] .nav .nav > .active:focus > a {
.ref-index th {font-weight: normal;}
.ref-index td {vertical-align: top;}
.ref-index td {vertical-align: top; min-width: 100px}
.ref-index .icon {width: 40px;}
.ref-index .alias {width: 40%;}
.ref-index-icons .alias {width: calc(40% - 40px);}
.ref-index .title {width: 60%;}
.ref-arguments th {text-align: right; padding-right: 10px;}
.ref-arguments th, .ref-arguments td {vertical-align: top;}
.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px}
.ref-arguments .name {width: 20%;}
.ref-arguments .desc {width: 80%;}
@ -264,31 +263,26 @@ table {
/* Syntax highlighting ---------------------------------------------------- */
pre {
word-wrap: normal;
word-break: normal;
border: 1px solid #eee;
}
pre, code {
pre, code, pre code {
background-color: #f8f8f8;
color: #333;
}
pre, pre code {
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: break-word;
}
pre code {
overflow: auto;
word-wrap: normal;
white-space: pre;
pre {
border: 1px solid #eee;
}
pre .img {
pre .img, pre .r-plt {
margin: 5px 0;
}
pre .img img {
pre .img img, pre .r-plt img {
background-color: #fff;
display: block;
height: auto;
}
code a, pre a {
@ -305,9 +299,8 @@ a.sourceLine:hover {
.kw {color: #264D66;} /* keyword */
.co {color: #888888;} /* comment */
.message { color: black; font-weight: bolder;}
.error { color: orange; font-weight: bolder;}
.warning { color: #6A0366; font-weight: bolder;}
.error {font-weight: bolder;}
.warning {font-weight: bolder;}
/* Clipboard --------------------------*/
@ -365,3 +358,27 @@ mark {
content: "";
}
}
/* Section anchors ---------------------------------
Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71
*/
div.csl-bib-body { }
div.csl-entry {
clear: both;
}
.hanging-indent div.csl-entry {
margin-left:2em;
text-indent:-2em;
}
div.csl-left-margin {
min-width:2em;
float:left;
}
div.csl-right-inline {
margin-left:2em;
padding-left:1em;
}
div.csl-indent {
margin-left: 2em;
}

4
dev/pkgdown.js

@ -80,7 +80,7 @@
$(document).ready(function() {
var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-label='Copy to clipboard' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy'></i></button>";
$(".examples, div.sourceCode").addClass("hasCopyButton");
$("div.sourceCode").addClass("hasCopyButton");
// Insert copy buttons:
$(copyButton).prependTo(".hasCopyButton");
@ -91,7 +91,7 @@
// Initialize clipboard:
var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', {
text: function(trigger) {
return trigger.parentNode.textContent;
return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, "");
}
});

8
dev/pkgdown.yml

@ -1,8 +1,8 @@
pandoc: '2.2'
pkgdown: 1.5.1
pandoc: 2.19.2
pkgdown: 2.0.7
pkgdown_sha: ~
articles: []
last_built: 2020-07-26T22:16Z
articles: {}
last_built: 2023-09-04T21:50Z
urls:
reference: https://philipp-baumann.github.io/simplerspec/reference
article: https://philipp-baumann.github.io/simplerspec/articles

178
dev/reference/assess_multimodels.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Assess multiple pairs of measured and predicted values — assess_multimodels • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Assess multiple pairs of measured and predicted values — assess_multimodels" />
<meta property="og:description" content="Return performance metrics for test set predictions and
measured values, e.g. for different model outcome variables." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Assess multiple pairs of measured and predicted values — assess_multimodels • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Assess multiple pairs of measured and predicted values — assess_multimodels"><meta property="og:description" content="Return performance metrics for test set predictions and
measured values, e.g. for different model outcome variables."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ measured values, e.g. for different model outcome variables." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Assess multiple pairs of measured and predicted values</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/utils-stats.R'><code>R/utils-stats.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/utils-stats.R" class="external-link"><code>R/utils-stats.R</code></a></small>
<div class="hidden name"><code>assess_multimodels.Rd</code></div>
</div>
@ -122,65 +54,67 @@ measured values, e.g. for different model outcome variables." />
measured values, e.g. for different model outcome variables.</p>
</div>
<pre class="usage"><span class='fu'>assess_multimodels</span>(<span class='no'>data</span>, <span class='no'>...</span>, <span class='kw'>.metrics</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"simplerspec"</span>, <span class='st'>"yardstick"</span>),
<span class='kw'>.model_name</span> <span class='kw'>=</span> <span class='st'>"model"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>data</th>
<td><p>Data frame with all measured (observed) and predicted variables.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Multiple arguments with observed (measured)-predicted pairs,
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">assess_multimodels</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> <span class="va">...</span>,</span>
<span> .metrics <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"simplerspec"</span>, <span class="st">"yardstick"</span><span class="op">)</span>,</span>
<span> .model_name <span class="op">=</span> <span class="st">"model"</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>data</dt>
<dd><p>Data frame with all measured (observed) and predicted variables.</p></dd>
<dt>...</dt>
<dd><p>Multiple arguments with observed (measured)-predicted pairs,
specified with <code>dplyr::vars(o = &lt;column_name&gt;, p = &lt;column_name&gt;)</code>.
Column names can strings or symbols. The arguments in `...` need to be named.</p></td>
</tr>
<tr>
<th>.metrics</th>
<td><p>Character vector with package used for metrics calculation.
Column names can strings or symbols. The arguments in <code>...</code> need to be named.</p></dd>
<dt>.metrics</dt>
<dd><p>Character vector with package used for metrics calculation.
Default is <code>"simplerspec"</code>, which uses
<code><a href='evaluate_model.html'>simplerspec::evaluate_model()</a></code>.</p></td>
</tr>
<tr>
<th>.model_name</th>
<td><p>String with name for the new column that specifies the
model or the outcome variable. Default is <code>"model"</code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Data frame with with summary statistics for measured values and
<code><a href="evaluate_model.html">simplerspec::evaluate_model()</a></code>.</p></dd>
<dt>.model_name</dt>
<dd><p>String with name for the new column that specifies the
model or the outcome variable. Default is <code>"model"</code>.</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Data frame with with summary statistics for measured values and
performance metrics for the pairs of measured and predicted values.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

170
dev/reference/average_spc.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Average spectra in list-column by entries in grouping column — average_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Average spectra in list-column by entries in grouping column — average_spc" />
<meta property="og:description" content="Average spectra in list-column of spectra tibble (spc_tbl) by
groups given in group column." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Average spectra in list-column by entries in grouping column — average_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Average spectra in list-column by entries in grouping column — average_spc"><meta property="og:description" content="Average spectra in list-column of spectra tibble (spc_tbl) by
groups given in group column."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ groups given in group column." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Average spectra in list-column by entries in grouping column</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/average-spc.R'><code>R/average-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/average-spc.R" class="external-link"><code>R/average-spc.R</code></a></small>
<div class="hidden name"><code>average_spc.Rd</code></div>
</div>
@ -122,70 +54,66 @@ groups given in group column." />
groups given in group column.</p>
</div>
<pre class="usage"><span class='fu'>average_spc</span>(<span class='no'>spc_tbl</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>, <span class='kw'>column_in</span> <span class='kw'>=</span> <span class='st'>"spc_rs"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble data frame containing at least the grouping column
given in argument <code>by</code> and input spectra given in list-column <code>column_in</code>.</p></td>
</tr>
<tr>
<th>by</th>
<td><p>Character vector of length 1L or name/symbol that specifies the
column by which groups of spectra are averaged. Default is <code>"sample_id"</code>.</p></td>
</tr>
<tr>
<th>column_in</th>
<td><p>Character vector of length 1L or or name/symbol that
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">average_spc</span><span class="op">(</span><span class="va">spc_tbl</span>, by <span class="op">=</span> <span class="st">"sample_id"</span>, column_in <span class="op">=</span> <span class="st">"spc_rs"</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble data frame containing at least the grouping column
given in argument <code>by</code> and input spectra given in list-column <code>column_in</code>.</p></dd>
<dt>by</dt>
<dd><p>Character vector of length 1L or name/symbol that specifies the
column by which groups of spectra are averaged. Default is <code>"sample_id"</code>.</p></dd>
<dt>column_in</dt>
<dd><p>Character vector of length 1L or or name/symbol that
specifies the list-column that contains the inputs spectra to be averaged.
Default is <code>"spc_rs"</code>, which are resampled spectra (i.e., resulting after
preceding <code><a href='resample_spc.html'>resample_spc()</a></code> step).</p></td>
</tr>
</table>
preceding <code><a href="resample_spc.html">resample_spc()</a></code> step).</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Spectra tibble data frame (class <code>"tbl_df"</code>, <code>"tbl"</code>, <code>"data.frame"</code>)
<p>Spectra tibble data frame (class <code>"tbl_df"</code>, <code>"tbl"</code>, <code>"data.frame"</code>)
with a new list-column of column name <code>"spc_mean"</code> at the last position,
containing mean spectra with identical row replicates within the same
<code>by</code>-group.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
</div>
<div id="details">
<h2>Details</h2>
<p>For memory efficiency and subsequent modeling, consider slicing the
extra row copies of <code>spc_mean</code> resulting from <code>average_spc()</code> for example by</p><ul>
<li><p><code>split(x = spc_tbl, f = spc_tbl$&lt;by&gt;) %&gt;% lapply(., function(x) x x[1, ]) %&gt;% do.call(., rbind)</code></p></li>
extra row copies of <code>spc_mean</code> resulting from <code>average_spc()</code> for example by</p><ul><li><p><code>split(x = spc_tbl, f = spc_tbl$&lt;by&gt;) %&gt;% lapply(., function(x) x x[1, ]) %&gt;% do.call(., rbind)</code></p></li>
<li><p><code>dplyr::group_by(spc_tbl, &lt;by&gt;) %&gt;% dplyr::slice(1L)</code></p></li>
</ul>
</ul></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

170
dev/reference/bind_lcols_dts.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bind list-columns within a tibble into a list of data.tables — bind_lcols_dts • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Bind list-columns within a tibble into a list of data.tables — bind_lcols_dts" />
<meta property="og:description" content="Bind one to many list-columns in spectral tibble into a list
of data.tables." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Bind list-columns within a tibble into a list of data.tables — bind_lcols_dts • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Bind list-columns within a tibble into a list of data.tables — bind_lcols_dts"><meta property="og:description" content="Bind one to many list-columns in spectral tibble into a list
of data.tables."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ of data.tables." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Bind list-columns within a tibble into a list of data.tables</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/plot-spc-extended.R'><code>R/plot-spc-extended.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/plot-spc-extended.R" class="external-link"><code>R/plot-spc-extended.R</code></a></small>
<div class="hidden name"><code>bind_lcols_dts.Rd</code></div>
</div>
@ -122,65 +54,63 @@ of data.tables." />
of data.tables.</p>
</div>
<pre class="usage"><span class='fu'>bind_lcols_dts</span>(<span class='no'>spc_tbl</span>, <span class='no'>lcols</span>, <span class='kw'>spc_id</span> <span class='kw'>=</span> <span class='st'>"unique_id"</span>, <span class='kw'>group_id</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Spectral data in a tibble data frame (classes "tibble_df",
"tbl" and "data.frame").</p></td>
</tr>
<tr>
<th>lcols</th>
<td><p>Character vector of column names of list-columns to be bound
into a list of data.tables</p></td>
</tr>
<tr>
<th>spc_id</th>
<td><p>Character vector denoting column name for a unique spectrum ID.
Default is <code>"unique_id"</code>.</p></td>
</tr>
<tr>
<th>group_id</th>
<td><p>Character vector denoting column name for the spectrum group
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">bind_lcols_dts</span><span class="op">(</span><span class="va">spc_tbl</span>, <span class="va">lcols</span>, spc_id <span class="op">=</span> <span class="st">"unique_id"</span>, group_id <span class="op">=</span> <span class="st">"sample_id"</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Spectral data in a tibble data frame (classes "tibble_df",
"tbl" and "data.frame").</p></dd>
<dt>lcols</dt>
<dd><p>Character vector of column names of list-columns to be bound
into a list of data.tables</p></dd>
<dt>spc_id</dt>
<dd><p>Character vector denoting column name for a unique spectrum ID.
Default is <code>"unique_id"</code>.</p></dd>
<dt>group_id</dt>
<dd><p>Character vector denoting column name for the spectrum group
ID. Default is <code>"sample_id"</code>. The group ID can later be used for
plotting spectra by group (e.g. by using different colors or panels).</p></td>
</tr>
</table>
plotting spectra by group (e.g. by using different colors or panels).</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A list of data.tables. Elements contain data from list-columns
<p>A list of data.tables. Elements contain data from list-columns
specified in <code>lcols</code> argument as data.tables. All data.tables contain in
addition <code>spc_id</code> and <code>group_id</code> columns.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

142
dev/reference/create_vip_rects.html

@ -1,72 +1,17 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create a data frame containing start and end positions (wavenumbers)
where variable importance in projection (VIP) is &gt; 1 — create_vip_rects • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Create a data frame containing start and end positions (wavenumbers)
where variable importance in projection (VIP) is &gt; 1 — create_vip_rects" />
<meta property="og:description" content="Given a data frame with VIP outputs (wavenumber and vip
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Create a data frame containing start and end positions (wavenumbers)
where variable importance in projection (VIP) is &gt; 1 — create_vip_rects • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Create a data frame containing start and end positions (wavenumbers)
where variable importance in projection (VIP) is &gt; 1 — create_vip_rects"><meta property="og:description" content="Given a data frame with VIP outputs (wavenumber and vip
columns), start and end values denoting spectral regions where VIP &amp;gt; 1
are returned as data frame. The functions can be used as helper
function for plotting VIP." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
function for plotting VIP."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -82,43 +27,30 @@ function for plotting VIP." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Create a data frame containing start and end positions (wavenumbers)
where variable importance in projection (VIP) is &gt; 1</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-vip.R'><code>R/pls-vip.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/pls-vip.R" class="external-link"><code>R/pls-vip.R</code></a></small>
<div class="hidden name"><code>create_vip_rects.Rd</code></div>
</div>
@ -129,49 +61,47 @@ are returned as data frame. The functions can be used as helper
function for plotting VIP.</p>
</div>
<pre class="usage"><span class='fu'>create_vip_rects</span>(<span class='no'>df_vip</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">create_vip_rects</span><span class="op">(</span><span class="va">df_vip</span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>df_vip</th>
<td><p>Data frame containing <code>wavenumber</code> and <code>vip</code> columns
(numeric)</p></td>
</tr>
</table>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>df_vip</dt>
<dd><p>Data frame containing <code>wavenumber</code> and <code>vip</code> columns
(numeric)</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Data.frame containing vectors <code>start</code> (numeric; wavenumber),
<p>Data.frame containing vectors <code>start</code> (numeric; wavenumber),
<code>end</code> (numeric; wavenumber) and group (integer; values are
<code>1:length(start))</code>.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

183
dev/reference/evaluate_model.html

@ -1,69 +1,14 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculate model evaluation metrics — evaluate_model • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Calculate model evaluation metrics — evaluate_model" />
<meta property="og:description" content="Calculate summary statistics of observed values and model
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Calculate model evaluation metrics — evaluate_model • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate model evaluation metrics — evaluate_model"><meta property="og:description" content="Calculate summary statistics of observed values and model
evaluation statistics for assessing agreement between observed (obs) and
predicted (pred) values." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
predicted (pred) values."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -79,42 +24,29 @@ predicted (pred) values." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Calculate model evaluation metrics</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/utils-stats.R'><code>R/utils-stats.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/utils-stats.R" class="external-link"><code>R/utils-stats.R</code></a></small>
<div class="hidden name"><code>evaluate_model.Rd</code></div>
</div>
@ -124,69 +56,64 @@ evaluation statistics for assessing agreement between observed (<code>obs</code>
predicted (<code>pred</code>) values.</p>
</div>
<pre class="usage"><span class='fu'>evaluate_model</span>(<span class='no'>data</span>, <span class='no'>obs</span>, <span class='no'>pred</span>)
<span class='fu'>summary_df</span>(<span class='no'>df</span>, <span class='no'>x</span>, <span class='no'>y</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>data</th>
<td><p><code>data.frame</code> with predicted and observed data in columns.</p></td>
</tr>
<tr>
<th>obs</th>
<td><p>Column that contains observed values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></td>
</tr>
<tr>
<th>pred</th>
<td><p>Column that contains predicted values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></td>
</tr>
<tr>
<th>df</th>
<td><p><code>data.frame</code> with predicted and observed data in columns.</p></td>
</tr>
<tr>
<th>x</th>
<td><p>Column that contains observed values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></td>
</tr>
<tr>
<th>y</th>
<td><p>Column that contains predicted values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></td>
</tr>
</table>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">evaluate_model</span><span class="op">(</span><span class="va">data</span>, <span class="va">obs</span>, <span class="va">pred</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">summary_df</span><span class="op">(</span><span class="va">df</span>, <span class="va">x</span>, <span class="va">y</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>data</dt>
<dd><p><code>data.frame</code> with predicted and observed data in columns.</p></dd>
<dt>obs</dt>
<dd><p>Column that contains observed values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></dd>
<dt>pred</dt>
<dd><p>Column that contains predicted values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></dd>
<dt>df</dt>
<dd><p><code>data.frame</code> with predicted and observed data in columns.</p></dd>
<dt>x</dt>
<dd><p>Column that contains observed values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></dd>
<dt>y</dt>
<dd><p>Column that contains predicted values, <code>symbol</code>/<code>name</code> or
<code>character</code> (wrapped in "").</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

158
dev/reference/extract_lcols2dts.html

@ -1,70 +1,15 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Extract multiple tibble list-columns and return data as list of
data.tables — extract_lcols2dts • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Extract multiple tibble list-columns and return data as list of
data.tables — extract_lcols2dts" />
<meta property="og:description" content="Extract multiple tibble list columns, row bind them separately
into single data tables and return a list of data.tables." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Extract multiple tibble list-columns and return data as list of
data.tables — extract_lcols2dts • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Extract multiple tibble list-columns and return data as list of
data.tables — extract_lcols2dts"><meta property="og:description" content="Extract multiple tibble list columns, row bind them separately
into single data tables and return a list of data.tables."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -80,43 +25,30 @@ into single data tables and return a list of data.tables." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Extract multiple tibble list-columns and return data as list of
data.tables</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/tbl-lcol-map-funprog.R'><code>R/tbl-lcol-map-funprog.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/tbl-lcol-map-funprog.R" class="external-link"><code>R/tbl-lcol-map-funprog.R</code></a></small>
<div class="hidden name"><code>extract_lcols2dts.Rd</code></div>
</div>
@ -125,53 +57,51 @@ data.tables</h1>
into single data tables and return a list of data.tables.</p>
</div>
<pre class="usage"><span class='fu'>extract_lcols2dts</span>(<span class='no'>spc_tbl</span>, <span class='no'>lcols</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Spectral tibble (data frame) with spectral data contained
in list-columns</p></td>
</tr>
<tr>
<th>lcols</th>
<td><p>Character vector containing names of list-columns to be
extracted into a list of data.tables</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>List of data.tables. Each element is a data.table derivied from a
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">extract_lcols2dts</span><span class="op">(</span><span class="va">spc_tbl</span>, <span class="va">lcols</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Spectral tibble (data frame) with spectral data contained
in list-columns</p></dd>
<dt>lcols</dt>
<dd><p>Character vector containing names of list-columns to be
extracted into a list of data.tables</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>List of data.tables. Each element is a data.table derivied from a
list-column specified in the <code>lcols</code> argument.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

144
dev/reference/extract_pls_vip.html

@ -1,74 +1,19 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Extract VIPs (variable importance in the projection) for a PLS
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Extract VIPs (variable importance in the projection) for a PLS
regression model output returned from model fitting with
<code>simplerspec::fit_pls()</code> — extract_pls_vip • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Extract VIPs (variable importance in the projection) for a PLS
simplerspec::fit_pls() — extract_pls_vip • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Extract VIPs (variable importance in the projection) for a PLS
regression model output returned from model fitting with
<code>simplerspec::fit_pls()</code> — extract_pls_vip" />
<meta property="og:description" content="VIPs are extracted based on the finalModel sublist
simplerspec::fit_pls() — extract_pls_vip"><meta property="og:description" content="VIPs are extracted based on the finalModel sublist
in the caret::train output contained in the model element
of the simplerspec::fit_pls() model output list. The VIPs for
derived number of PLS components in the finalModel are computed." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
derived number of PLS components in the finalModel are computed."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -84,96 +29,81 @@ derived number of PLS components in the finalModel are computed." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Extract VIPs (variable importance in the projection) for a PLS
regression model output returned from model fitting with
<code>simplerspec::fit_pls()</code></h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-vip.R'><code>R/pls-vip.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/pls-vip.R" class="external-link"><code>R/pls-vip.R</code></a></small>
<div class="hidden name"><code>extract_pls_vip.Rd</code></div>
</div>
<div class="ref-description">
<p>VIPs are extracted based on the <code>finalModel</code> sublist
in the <code><a href='https://rdrr.io/pkg/caret/man/train.html'>caret::train</a></code> output contained in the <code>model</code> element
of the <code><a href='fit_pls.html'>simplerspec::fit_pls()</a></code> model output list. The VIPs for
in the <code><a href="https://rdrr.io/pkg/caret/man/train.html" class="external-link">caret::train</a></code> output contained in the <code>model</code> element
of the <code><a href="fit_pls.html">simplerspec::fit_pls()</a></code> model output list. The VIPs for
derived number of PLS components in the <code>finalModel</code> are computed.</p>
</div>
<pre class="usage"><span class='fu'>extract_pls_vip</span>(<span class='no'>mout</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">extract_pls_vip</span><span class="op">(</span><span class="va">mout</span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>mout</th>
<td><p>Model output list returned from <code><a href='fit_pls.html'>simplerspec::fit_pls()</a></code>.</p></td>
</tr>
</table>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>mout</dt>
<dd><p>Model output list returned from <code><a href="fit_pls.html">simplerspec::fit_pls()</a></code>.</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A tibble data frame with columns <code>wavenumber</code> and correponding
<p>A tibble data frame with columns <code>wavenumber</code> and correponding
VIP values in the column <code>vip</code> for the finally chosen PLS regression
model at the final number of PLS components.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

375
dev/reference/fit_pls.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calibration sampling, model tuning, and PLS regression — fit_pls • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Calibration sampling, model tuning, and PLS regression — fit_pls" />
<meta property="og:description" content="Perform calibration sampling and use selected
calibration set for model tuning" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Calibration sampling, model tuning, and PLS regression — fit_pls • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Calibration sampling, model tuning, and PLS regression — fit_pls"><meta property="og:description" content="Perform calibration sampling and use selected
calibration set for model tuning"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ calibration set for model tuning" />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Calibration sampling, model tuning, and PLS regression</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-modeling.R'><code>R/pls-modeling.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/pls-modeling.R" class="external-link"><code>R/pls-modeling.R</code></a></small>
<div class="hidden name"><code>fit_pls.Rd</code></div>
</div>
@ -122,100 +54,130 @@ calibration set for model tuning" />
calibration set for model tuning</p>
</div>
<pre class="usage"><span class='fu'>fit_pls</span>(<span class='no'>spec_chem</span>, <span class='no'>response</span>, <span class='kw'>variable</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>center</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>scale</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>evaluation_method</span> <span class='kw'>=</span> <span class='st'>"test_set"</span>, <span class='kw'>validation</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>split_method</span> <span class='kw'>=</span> <span class='st'>"ken_stone"</span>, <span class='kw'>ratio_val</span> <span class='kw'>=</span> <span class='fl'>1</span>/<span class='fl'>3</span>, <span class='kw'>ken_sto_pc</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='no'>pc</span>,
<span class='kw'>invert</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>tuning_method</span> <span class='kw'>=</span> <span class='st'>"resampling"</span>,
<span class='kw'>resampling_method</span> <span class='kw'>=</span> <span class='st'>"kfold_cv"</span>, <span class='kw'>cv</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>resampling_seed</span> <span class='kw'>=</span> <span class='fl'>123</span>,
<span class='kw'>pls_ncomp_max</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>ncomp_fixed</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>print</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>env</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>parent.frame</a></span>())
<span class='fu'>pls_ken_stone</span>(<span class='no'>spec_chem</span>, <span class='no'>response</span>, <span class='kw'>variable</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>center</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>scale</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>evaluation_method</span> <span class='kw'>=</span> <span class='st'>"test_set"</span>, <span class='kw'>validation</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>split_method</span> <span class='kw'>=</span> <span class='st'>"ken_stone"</span>, <span class='kw'>ratio_val</span> <span class='kw'>=</span> <span class='fl'>1</span>/<span class='fl'>3</span>, <span class='kw'>ken_sto_pc</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='no'>pc</span>,
<span class='kw'>invert</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>tuning_method</span> <span class='kw'>=</span> <span class='st'>"resampling"</span>,
<span class='kw'>resampling_method</span> <span class='kw'>=</span> <span class='st'>"kfold_cv"</span>, <span class='kw'>cv</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>resampling_seed</span> <span class='kw'>=</span> <span class='fl'>123</span>,
<span class='kw'>pls_ncomp_max</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>ncomp_fixed</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>print</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>env</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>parent.frame</a></span>())</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spec_chem</th>
<td><p>Tibble that contains spectra, metadata and chemical
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">fit_pls</span><span class="op">(</span></span>
<span> <span class="va">spec_chem</span>,</span>
<span> <span class="va">response</span>,</span>
<span> variable <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> center <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> scale <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> evaluation_method <span class="op">=</span> <span class="st">"test_set"</span>,</span>
<span> validation <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> split_method <span class="op">=</span> <span class="st">"ken_stone"</span>,</span>
<span> ratio_val <span class="op">=</span> <span class="fl">1</span><span class="op">/</span><span class="fl">3</span>,</span>
<span> ken_sto_pc <span class="op">=</span> <span class="fl">2</span>,</span>
<span> <span class="va">pc</span>,</span>
<span> invert <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> tuning_method <span class="op">=</span> <span class="st">"resampling"</span>,</span>
<span> resampling_method <span class="op">=</span> <span class="st">"kfold_cv"</span>,</span>
<span> cv <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> resampling_seed <span class="op">=</span> <span class="fl">123</span>,</span>
<span> pls_ncomp_max <span class="op">=</span> <span class="fl">20</span>,</span>
<span> ncomp_fixed <span class="op">=</span> <span class="fl">5</span>,</span>
<span> print <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> env <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/sys.parent.html" class="external-link">parent.frame</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">pls_ken_stone</span><span class="op">(</span></span>
<span> <span class="va">spec_chem</span>,</span>
<span> <span class="va">response</span>,</span>
<span> variable <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> center <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> scale <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> evaluation_method <span class="op">=</span> <span class="st">"test_set"</span>,</span>
<span> validation <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> split_method <span class="op">=</span> <span class="st">"ken_stone"</span>,</span>
<span> ratio_val <span class="op">=</span> <span class="fl">1</span><span class="op">/</span><span class="fl">3</span>,</span>
<span> ken_sto_pc <span class="op">=</span> <span class="fl">2</span>,</span>
<span> <span class="va">pc</span>,</span>
<span> invert <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> tuning_method <span class="op">=</span> <span class="st">"resampling"</span>,</span>
<span> resampling_method <span class="op">=</span> <span class="st">"kfold_cv"</span>,</span>
<span> cv <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> resampling_seed <span class="op">=</span> <span class="fl">123</span>,</span>
<span> pls_ncomp_max <span class="op">=</span> <span class="fl">20</span>,</span>
<span> ncomp_fixed <span class="op">=</span> <span class="fl">5</span>,</span>
<span> print <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> env <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/sys.parent.html" class="external-link">parent.frame</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spec_chem</dt>
<dd><p>Tibble that contains spectra, metadata and chemical
reference as list-columns. The tibble to be supplied to <code>spec_chem</code> can
be generated by the `join_chem_spc() function`</p></td>
</tr>
<tr>
<th>response</th>
<td><p>Response variable as symbol or name
be generated by the <code>join_chem_spc() function</code></p></dd>
<dt>response</dt>
<dd><p>Response variable as symbol or name
(without quotes, no character string). The provided response symbol needs to be
a column name in the <code>spec_chem</code> tibble.</p></td>
</tr>
<tr>
<th>variable</th>
<td><p>Depreciated and replaced by `response`</p></td>
</tr>
<tr>
<th>center</th>
<td><p>Logical whether to perform mean centering of each spectrum column
a column name in the <code>spec_chem</code> tibble.</p></dd>
<dt>variable</dt>
<dd><p>Depreciated and replaced by <code>response</code></p></dd>
<dt>center</dt>
<dd><p>Logical whether to perform mean centering of each spectrum column
(e.g. wavenumber or wavelength) after common spectrum preprocessing. Default is
<code>center = TRUE</code></p></td>
</tr>
<tr>
<th>scale</th>
<td><p>Logical whether to perform standard deviation scaling
<code>center = TRUE</code></p></dd>
<dt>scale</dt>
<dd><p>Logical whether to perform standard deviation scaling
of each spectrum column (e.g. wavenumber or wavelength) after common
spectrum preprocessing. Default is <code>scale = TRUE</code></p></td>
</tr>
<tr>
<th>evaluation_method</th>
<td><p>Character string stating evaluation method.
spectrum preprocessing. Default is <code>scale = TRUE</code></p></dd>
<dt>evaluation_method</dt>
<dd><p>Character string stating evaluation method.
Either <code>"test_set"</code> (default) or <code>"resampling"</code>. <code>"test_set"</code>
will split the data into a calibration (training) and validation (test) set,
and evaluate the final model by predicting on the validation set.
If <code>"resampling"</code>, the finally selected model will be evaluated based
on the cross-validation hold-out predictions.</p></td>
</tr>
<tr>
<th>validation</th>
<td><p>Depreciated and replaced by <code>evaluation_method</code>.
Default is <code>TRUE</code>.</p></td>
</tr>
<tr>
<th>split_method</th>
<td><p>Method how to to split the data into a independent test
on the cross-validation hold-out predictions.</p></dd>
<dt>validation</dt>
<dd><p>Depreciated and replaced by <code>evaluation_method</code>.
Default is <code>TRUE</code>.</p></dd>
<dt>split_method</dt>
<dd><p>Method how to to split the data into a independent test
set. Default is <code>"ken_sto"</code>, which will select samples for calibration
based on Kennard-Stone sampling algorithm of preprocessed spectra. The
proportion of validation to the total number of samples can be specified
in the argument <code>ratio_val</code>.
<code>split_method = "random"</code> will create a single random split.</p></td>
</tr>
<tr>
<th>ratio_val</th>
<td><p>Ratio of validation (test) samples to
total number of samples (calibration (training) and validation (test)).</p></td>
</tr>
<tr>
<th>ken_sto_pc</th>
<td><p>Number of component used
<code>split_method = "random"</code> will create a single random split.</p></dd>
<dt>ratio_val</dt>
<dd><p>Ratio of validation (test) samples to
total number of samples (calibration (training) and validation (test)).</p></dd>
<dt>ken_sto_pc</dt>
<dd><p>Number of component used
for calculating mahalanobsis distance on PCA scores for computing
Kennard-Stone algorithm.
Default is <code>ken_sto_pc = 2</code>, which will use the first two PCA
components.</p></td>
</tr>
<tr>
<th>pc</th>
<td><p>Depreciated; renamed argument is `ken_sto_pc`.</p></td>
</tr>
<tr>
<th>invert</th>
<td><p>Logical</p></td>
</tr>
<tr>
<th>tuning_method</th>
<td><p>Character specifying tuning method. Tuning method
components.</p></dd>
<dt>pc</dt>
<dd><p>Depreciated; renamed argument is <code>ken_sto_pc</code>.</p></dd>
<dt>invert</dt>
<dd><p>Logical</p></dd>
<dt>tuning_method</dt>
<dd><p>Character specifying tuning method. Tuning method
affects how caret selects a final tuning value set from a list of candidate
values. Possible values are <code>"resampling"</code>, which will use a
specified resampling method such as repeated k-fold cross-validation (see
@ -225,77 +187,72 @@ that lead to optimal model performance. The value <code>"none"</code> will force
caret to compute a final model for a predefined canditate PLS tuning
parameter number of PLS components. In this case, the value
supplied by <code>ncomp_fixed</code>` is used to set model complexity at
a fixed number of components.</p></td>
</tr>
<tr>
<th>resampling_method</th>
<td><p>Character specifying resampling method. Currently,
a fixed number of components.</p></dd>
<dt>resampling_method</dt>
<dd><p>Character specifying resampling method. Currently,
<code>"kfold_cv"</code> (default, performs 10-fold cross-validation),
<code>"rep_kfold_cv"</code> (performs 5-times repeated 10-fold cross-validation),
<code>"loocv"</code> (performs leave-one-out cross-validation), and <code>"none"</code>
(if <code>resampling_method = "none"</code>) are supported.</p></td>
</tr>
<tr>
<th>cv</th>
<td><p>Depreciated. Use <code>resampling_method</code> instead.</p></td>
</tr>
<tr>
<th>resampling_seed</th>
<td><p>Random seed (integer) that will be used for generating
resampling indices, which will be supplied to <code><a href='https://rdrr.io/pkg/caret/man/trainControl.html'>caret::trainControl</a></code>.
(if <code>resampling_method = "none"</code>) are supported.</p></dd>
<dt>cv</dt>
<dd><p>Depreciated. Use <code>resampling_method</code> instead.</p></dd>
<dt>resampling_seed</dt>
<dd><p>Random seed (integer) that will be used for generating
resampling indices, which will be supplied to <code><a href="https://rdrr.io/pkg/caret/man/trainControl.html" class="external-link">caret::trainControl</a></code>.
This makes sure that modeling results are constant when re-fitting.
Default is <code>resampling_seed = 123</code>.</p></td>
</tr>
<tr>
<th>pls_ncomp_max</th>
<td><p>Maximum number of PLS components that are evaluated
Default is <code>resampling_seed = 123</code>.</p></dd>
<dt>pls_ncomp_max</dt>
<dd><p>Maximum number of PLS components that are evaluated
by caret::train. Caret will aggregate a performance profile using resampling
for an integer sequence from 1 to <code>pls_ncomp_max</code></p></td>
</tr>
<tr>
<th>ncomp_fixed</th>
<td><p>Integer of fixed number of PLS components. Will only be
for an integer sequence from 1 to <code>pls_ncomp_max</code></p></dd>
<dt>ncomp_fixed</dt>
<dd><p>Integer of fixed number of PLS components. Will only be
used when <code>tuning_method = "none"</code> and <code>resampling_method = "none"</code>
are used.</p></td>
</tr>
<tr>
<th>print</th>
<td><p>Logical expression whether model evaluation graphs shall be
printed</p></td>
</tr>
<tr>
<th>env</th>
<td><p>Environment where function is evaluated. Default is
<code>parent.frame</code>.</p></td>
</tr>
</table>
are used.</p></dd>
<dt>print</dt>
<dd><p>Logical expression whether model evaluation graphs shall be
printed</p></dd>
<dt>env</dt>
<dd><p>Environment where function is evaluated. Default is
<code>parent.frame</code>.</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

298
dev/reference/fit_rf.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calibration sampling, and random forest model tuning and evaluation — fit_rf • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Calibration sampling, and random forest model tuning and evaluation — fit_rf" />
<meta property="og:description" content="Perform calibration sampling and use selected
calibration set for model tuning" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Calibration sampling, and random forest model tuning and evaluation — fit_rf • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Calibration sampling, and random forest model tuning and evaluation — fit_rf"><meta property="og:description" content="Perform calibration sampling and use selected
calibration set for model tuning"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ calibration set for model tuning" />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Calibration sampling, and random forest model tuning and evaluation</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-modeling.R'><code>R/pls-modeling.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/pls-modeling.R" class="external-link"><code>R/pls-modeling.R</code></a></small>
<div class="hidden name"><code>fit_rf.Rd</code></div>
</div>
@ -122,78 +54,91 @@ calibration set for model tuning" />
calibration set for model tuning</p>
</div>
<pre class="usage"><span class='fu'>fit_rf</span>(<span class='no'>spec_chem</span>, <span class='no'>response</span>, <span class='kw'>variable</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>evaluation_method</span> <span class='kw'>=</span> <span class='st'>"test_set"</span>,
<span class='kw'>validation</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>split_method</span> <span class='kw'>=</span> <span class='st'>"ken_stone"</span>, <span class='no'>ratio_val</span>,
<span class='kw'>ken_sto_pc</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>pc</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>invert</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>tuning_method</span> <span class='kw'>=</span> <span class='st'>"resampling"</span>, <span class='kw'>resampling_seed</span> <span class='kw'>=</span> <span class='fl'>123</span>, <span class='kw'>cv</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>ntree_max</span> <span class='kw'>=</span> <span class='fl'>500</span>, <span class='kw'>print</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>env</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>parent.frame</a></span>())</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spec_chem</th>
<td><p>Tibble that contains spectra, metadata and chemical
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">fit_rf</span><span class="op">(</span></span>
<span> <span class="va">spec_chem</span>,</span>
<span> <span class="va">response</span>,</span>
<span> variable <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> evaluation_method <span class="op">=</span> <span class="st">"test_set"</span>,</span>
<span> validation <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> split_method <span class="op">=</span> <span class="st">"ken_stone"</span>,</span>
<span> <span class="va">ratio_val</span>,</span>
<span> ken_sto_pc <span class="op">=</span> <span class="fl">2</span>,</span>
<span> pc <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> invert <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> tuning_method <span class="op">=</span> <span class="st">"resampling"</span>,</span>
<span> resampling_seed <span class="op">=</span> <span class="fl">123</span>,</span>
<span> cv <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ntree_max <span class="op">=</span> <span class="fl">500</span>,</span>
<span> print <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> env <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/sys.parent.html" class="external-link">parent.frame</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spec_chem</dt>
<dd><p>Tibble that contains spectra, metadata and chemical
reference as list-columns. The tibble to be supplied to <code>spec_chem</code> can
be generated by the `join_chem_spc() function`</p></td>
</tr>
<tr>
<th>response</th>
<td><p>Response variable as symbol or name
be generated by the <code>join_chem_spc() function</code></p></dd>
<dt>response</dt>
<dd><p>Response variable as symbol or name
(without quotes, no character string). The provided response symbol needs to be
a column name in the <code>spec_chem</code> tibble.</p></td>
</tr>
<tr>
<th>variable</th>
<td><p>Depreciated and replaced by `response`</p></td>
</tr>
<tr>
<th>evaluation_method</th>
<td><p>Character string stating evaluation method.
a column name in the <code>spec_chem</code> tibble.</p></dd>
<dt>variable</dt>
<dd><p>Depreciated and replaced by <code>response</code></p></dd>
<dt>evaluation_method</dt>
<dd><p>Character string stating evaluation method.
Either <code>"test_set"</code> (default) or <code>"resampling"</code>. <code>"test_set"</code>
will split the data into a calibration (training) and validation (test) set,
and evaluate the final model by predicting on the validation set.
If <code>"resampling"</code>, the finally selected model will be evaluated based
on the cross-validation hold-out predictions.</p></td>
</tr>
<tr>
<th>validation</th>
<td><p>Depreciated and replaced by <code>evaluation_method</code>.
Default is <code>TRUE</code>.</p></td>
</tr>
<tr>
<th>split_method</th>
<td><p>Method how to to split the data into a independent test
on the cross-validation hold-out predictions.</p></dd>
<dt>validation</dt>
<dd><p>Depreciated and replaced by <code>evaluation_method</code>.
Default is <code>TRUE</code>.</p></dd>
<dt>split_method</dt>
<dd><p>Method how to to split the data into a independent test
set. Default is <code>"ken_sto"</code>, which will select samples for calibration
based on Kennard-Stone sampling algorithm of preprocessed spectra. The
proportion of validation to the total number of samples can be specified
in the argument <code>ratio_val</code>.
<code>split_method = "random"</code> will create a single random split.</p></td>
</tr>
<tr>
<th>ratio_val</th>
<td><p>Ratio of validation (test) samples to
total number of samples (calibration (training) and validation (test)).</p></td>
</tr>
<tr>
<th>ken_sto_pc</th>
<td><p>Number of component used
<code>split_method = "random"</code> will create a single random split.</p></dd>
<dt>ratio_val</dt>
<dd><p>Ratio of validation (test) samples to
total number of samples (calibration (training) and validation (test)).</p></dd>
<dt>ken_sto_pc</dt>
<dd><p>Number of component used
for calculating mahalanobsis distance on PCA scores for computing
Kennard-Stone algorithm.
Default is <code>ken_sto_pc = 2</code>, which will use the first two PCA
components.</p></td>
</tr>
<tr>
<th>pc</th>
<td><p>Depreciated; renamed argument is `ken_sto_pc`.</p></td>
</tr>
<tr>
<th>invert</th>
<td><p>Logical</p></td>
</tr>
<tr>
<th>tuning_method</th>
<td><p>Character specifying tuning method. Tuning method
components.</p></dd>
<dt>pc</dt>
<dd><p>Depreciated; renamed argument is <code>ken_sto_pc</code>.</p></dd>
<dt>invert</dt>
<dd><p>Logical</p></dd>
<dt>tuning_method</dt>
<dd><p>Character specifying tuning method. Tuning method
affects how caret selects a final tuning value set from a list of candidate
values. Possible values are <code>"resampling"</code>, which will use a
specified resampling method such as repeated k-fold cross-validation (see
@ -203,63 +148,58 @@ that lead to optimal model performance. The value <code>"none"</code> will force
caret to compute a final model for a predefined canditate PLS tuning
parameter number of PLS components. In this case, the value
supplied by <code>ncomp_fixed</code>` is used to set model complexity at
a fixed number of components.</p></td>
</tr>
<tr>
<th>resampling_seed</th>
<td><p>Random seed (integer) that will be used for generating
resampling indices, which will be supplied to <code><a href='https://rdrr.io/pkg/caret/man/trainControl.html'>caret::trainControl</a></code>.
a fixed number of components.</p></dd>
<dt>resampling_seed</dt>
<dd><p>Random seed (integer) that will be used for generating
resampling indices, which will be supplied to <code><a href="https://rdrr.io/pkg/caret/man/trainControl.html" class="external-link">caret::trainControl</a></code>.
This makes sure that modeling results are constant when re-fitting.
Default is <code>resampling_seed = 123</code>.</p></td>
</tr>
<tr>
<th>cv</th>
<td><p>Depreciated. Use <code>resampling_method</code> instead.</p></td>
</tr>
<tr>
<th>ntree_max</th>
<td><p>Maximum random forest trees
Default is <code>resampling_seed = 123</code>.</p></dd>
<dt>cv</dt>
<dd><p>Depreciated. Use <code>resampling_method</code> instead.</p></dd>
<dt>ntree_max</dt>
<dd><p>Maximum random forest trees
by caret::train. Caret will aggregate a performance profile using resampling
for an integer sequence from 1 to <code>ntree_max</code> trees.</p></td>
</tr>
<tr>
<th>print</th>
<td><p>Logical expression whether model evaluation graphs shall be
printed</p></td>
</tr>
<tr>
<th>env</th>
<td><p>Environment where function is evaluated. Default is
<code>parent.frame</code>.</p></td>
</tr>
</table>
for an integer sequence from 1 to <code>ntree_max</code> trees.</p></dd>
<dt>print</dt>
<dd><p>Logical expression whether model evaluation graphs shall be
printed</p></dd>
<dt>env</dt>
<dd><p>Environment where function is evaluated. Default is
<code>parent.frame</code>.</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

175
dev/reference/gather_spc.html

@ -1,48 +1,7 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gather measurements of different spectra types, corresponding
x-axis values and metadata from nested list. — gather_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Gather measurements of different spectra types, corresponding
x-axis values and metadata from nested list. — gather_spc" />
<meta property="og:description" content="Gather spectra, corresponding x-axis values, and device and
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Gather measurements of different spectra types, corresponding
x-axis values and metadata from nested list. — gather_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Gather measurements of different spectra types, corresponding
x-axis values and metadata from nested list. — gather_spc"><meta property="og:description" content='Gather spectra, corresponding x-axis values, and device and
measurement metadata from a nested list into a spectra tibble, so that one
row represents one spectral measurement. Spectra, x-axis values and metadata
are mapped from the individual list elements (named after file name including
@ -50,32 +9,18 @@ the extension) and transformed into (list-)columns of a spectra tibble,
which is an extended data frame. For each measurement, spectral data and
metadata are combined into one row of the tidy data frame. In addition, the ID
columns unique_id, file_id, and sample_id are extracted from
&quot;metadata&quot; (data frame) list entries and returned as identifier columns of
"metadata" (data frame) list entries and returned as identifier columns of
the spectra tibble. List-columns facilitate keeping related data together in
a rectangular data structure. They can be manipulated easily during
subsequent transformations, for example using the standardized functions of
the simplerspec data processing pipeline." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
the simplerspec data processing pipeline.'><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -91,43 +36,30 @@ the simplerspec data processing pipeline." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Gather measurements of different spectra types, corresponding
x-axis values and metadata from nested list.</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/gather-spc.R'><code>R/gather-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/gather-spc.R" class="external-link"><code>R/gather-spc.R</code></a></small>
<div class="hidden name"><code>gather_spc.Rd</code></div>
</div>
@ -147,29 +79,28 @@ subsequent transformations, for example using the standardized functions of
the simplerspec data processing pipeline.</p>
</div>
<pre class="usage"><span class='fu'>gather_spc</span>(<span class='no'>data</span>, <span class='kw'>spc_types</span> <span class='kw'>=</span> <span class='st'>"spc"</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">gather_spc</span><span class="op">(</span><span class="va">data</span>, spc_types <span class="op">=</span> <span class="st">"spc"</span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>data</th>
<td><p>Recursive list named with filename (<code>file_id</code>) at first level
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>data</dt>
<dd><p>Recursive list named with filename (<code>file_id</code>) at first level
entries, where each element containing a sample measurement has nested
metadata (<code>"metadata"</code>), spectra types (see <code>spc_types</code>), corresponding
x-axis values (see section <em>"Details on spectra data checks and matching"</em>).
The <code>data</code> list is a structural convention to organize spectra and their
metadata. It follows for example the list structure returned from the Bruker
OPUS binary reader <code><a href='read_opus_univ.html'>simplerspec::read_opus_univ()</a></code>.</p></td>
</tr>
<tr>
<th>spc_types</th>
<td><p>Character vector with the spectra types to be extracted
OPUS binary reader <code><a href="read_opus_univ.html">simplerspec::read_opus_univ()</a></code>.</p></dd>
<dt>spc_types</dt>
<dd><p>Character vector with the spectra types to be extracted
from <code>data</code> list and gathered into list-columns. The spectra type names need
to exactly follow the naming conventions, and the element names and contents
need to be present at the second list hierarchy of <code>data</code>. These values are
allowed:</p><ul>
<li><p><code>"spc"</code> (default): final raw spectra after atmospheric compensation, if
allowed:</p><ul><li><p><code>"spc"</code> (default): final raw spectra after atmospheric compensation, if
performed (named <code>AB</code> in Bruker OPUS software; results from referencing
sample to reference single channel reflectance and transforming to
absorbance).</p></li>
@ -181,15 +112,15 @@ spectra)</p></li>
without x-axis list-columns are matched and returned)</p></li>
<li><p><code>"ig_rf"</code>: Interferograms of the reference spectra (currently only spectra
without x-axis list-columns are matched and returned)</p></li>
</ul></td>
</tr>
</table>
</ul></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Spectra tibble (<code>spc_tbl</code> with classes <code>"tbl_df"</code>, <code>"tbl"</code>, and
<code>"data.frame"</code>) with the following (list-)columns:</p><ul>
<li><p><code>"unique_id"</code>: Character vector with unique measurement identifier, likely
<p>Spectra tibble (<code>spc_tbl</code> with classes <code>"tbl_df"</code>, <code>"tbl"</code>, and
<code>"data.frame"</code>) with the following (list-)columns:</p><ul><li><p><code>"unique_id"</code>: Character vector with unique measurement identifier, likely
a string with file names in combination with date and time (extracted from
each <code>"metadata"</code> data frame column).</p></li>
<li><p><code>"file_id"</code> : Character vector with file name including the extension
@ -204,15 +135,13 @@ List(s) of data.table's containing spectra type(s).</p></li>
<code>"wavenumbers_sc_rf"</code>, <code>"wavelengths_sc_rf"</code>, or <code>"x_values_sc_rf"</code>:
List(s) of numeric vectors with matched x-axis values (see <em>"Details on
spectra data checks and matching"</em> below).</p></li>
</ul>
<h2 class="hasAnchor" id="details-on-spectra-data-checks-and-matching"><a class="anchor" href="#details-on-spectra-data-checks-and-matching"></a>Details on spectra data checks and matching</h2>
</ul></div>
<div id="details-on-spectra-data-checks-and-matching">
<h2>Details on spectra data checks and matching</h2>
<p><code>gather_spc()</code> checks whether these conditions are met for each measurement
in the list <code>data</code>:</p><ol>
<li><p>Make sure that the first level <code>data</code> elements are named (assumed to be
in the list <code>data</code>:</p><ol><li><p>Make sure that the first level <code>data</code> elements are named (assumed to be
the file name the data originate from), and remove missing measurements with
an informative message.</p></li>
<li><p>Remove any duplicated file names and raise a message if there are
@ -223,8 +152,7 @@ all data elements for incomplete spectral measurements.</p></li>
<li><p>Match spectra types and possible corresponding x-axis types from
a lookup list. For each selected spectrum type (left), at least one of
the element names of the x-axis type (right) needs to be present for each
measurement in the list <code>data</code>:</p><ul>
<li><p><code>"spc"</code> : <code>"wavenumbers"</code>, <code>"wavelengths"</code>, or <code>"x_values"</code></p></li>
measurement in the list <code>data</code>:</p><ul><li><p><code>"spc"</code> : <code>"wavenumbers"</code>, <code>"wavelengths"</code>, or <code>"x_values"</code></p></li>
<li><p><code>"spc_nocomp"</code> : <code>"wavenumbers"</code>, <code>"wavelengths"</code>, or <code>"x_values"</code></p></li>
<li><p><code>"sc_sm"</code> : <code>"wavenumbers_sc_sm"</code>, <code>"wavelengths_sc_sm"</code>, or
<code>"x_values_sc_sm"</code></p></li>
@ -234,34 +162,29 @@ measurement in the list <code>data</code>:</p><ul>
<li><p>Check if <code>"metadata"</code> elements are present and remove data elements for
measurements with missing or incorrectly named metadata elements
(message).</p></li>
</ol>
</ol></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

252
dev/reference/index.html

@ -1,66 +1,12 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Function reference • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Function reference" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Function reference • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Function reference"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-index">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -76,279 +22,185 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Reference</h1>
</div>
<table class="ref-index">
<colgroup>
<col class="alias" />
<col class="title" />
</colgroup>
<tbody>
<tr>
<th colspan="2">
<h2 id="section-all-functions" class="hasAnchor"><a href="#section-all-functions" class="anchor"></a>All functions</h2>
<table class="ref-index"><colgroup><col class="alias"><col class="title"></colgroup><tbody><tr><th colspan="2">
<h2 id="all-functions">All functions <a href="#all-functions" class="anchor" aria-hidden="true"></a></h2>
<p class="section-desc"></p>
</th>
</tr>
</tbody><tbody>
<tr>
<td>
</tr></tbody><tbody><tr><td>
<p><code><a href="assess_multimodels.html">assess_multimodels()</a></code> </p>
</td>
<td><p>Assess multiple pairs of measured and predicted values</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="average_spc.html">average_spc()</a></code> </p>
</td>
<td><p>Average spectra in list-column by entries in grouping column</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="bind_lcols_dts.html">bind_lcols_dts()</a></code> </p>
</td>
<td><p>Bind list-columns within a tibble into a list of data.tables</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="create_vip_rects.html">create_vip_rects()</a></code> </p>
</td>
<td><p>Create a data frame containing start and end positions (wavenumbers)
where variable importance in projection (VIP) is &gt; 1</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="evaluate_model.html">evaluate_model()</a></code> <code><a href="evaluate_model.html">summary_df()</a></code> </p>
</td>
<td><p>Calculate model evaluation metrics</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="extract_lcols2dts.html">extract_lcols2dts()</a></code> </p>
</td>
<td><p>Extract multiple tibble list-columns and return data as list of
data.tables</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="extract_pls_vip.html">extract_pls_vip()</a></code> </p>
</td>
<td><p>Extract VIPs (variable importance in the projection) for a PLS
regression model output returned from model fitting with
<code>simplerspec::fit_pls()</code></p></td>
</tr><tr>
<td>
<code><a href="../reference/fit_pls.html">simplerspec::fit_pls()</a></code></p></td>
</tr><tr><td>
<p><code><a href="fit_pls.html">fit_pls()</a></code> <code><a href="fit_pls.html">pls_ken_stone()</a></code> </p>
</td>
<td><p>Calibration sampling, model tuning, and PLS regression</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="fit_rf.html">fit_rf()</a></code> </p>
</td>
<td><p>Calibration sampling, and random forest model tuning and evaluation</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="gather_spc.html">gather_spc()</a></code> </p>
</td>
<td><p>Gather measurements of different spectra types, corresponding
x-axis values and metadata from nested list.</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="join_chem_spec.html">join_chem_spec()</a></code> </p>
</td>
<td><p>Join chemical and spectral data frames</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="join_spc_chem.html">join_spc_chem()</a></code> </p>
</td>
<td><p>Join spectra data and chemical data tibbles</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="merge_dts.html">merge_dts()</a></code> </p>
</td>
<td><p>Merge list-columns of spectra, x-axis values, metadata and additional
measured variables into a single long form data.table</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="merge_dts_l.html">merge_dts_l()</a></code> </p>
</td>
<td><p>Wrapper function around <code>merge_dts()</code> for list of tibbles to
<td><p>Wrapper function around <code><a href="../reference/merge_dts.html">merge_dts()</a></code> for list of tibbles to
aggregate data for plotting.</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="plot_pls_vip.html">plot_pls_vip()</a></code> </p>
</td>
<td><p>Plot stacked ggplot2 graphs with the Variable Importance for the
Projection (VIP) scores, mean replicate spectra (absorbance) per sample_id,
and the preprocessed spectra.</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="plot_spc.html">plot_spc()</a></code> </p>
</td>
<td><p>Plot tibble spectra</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="plot_spc_ext.html">plot_spc_ext()</a></code> </p>
</td>
<td><p>ggplot2 wrapper for extended spectra plotting</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="predict_from_spc.html">predict_from_spc()</a></code> </p>
</td>
<td><p>Predict soil properties of new spectra based on a list of calibration models</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="preprocess_spc.html">preprocess_spc()</a></code> </p>
</td>
<td><p>Preprocess spectra</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="read_asd.html">read_asd()</a></code> </p>
</td>
<td><p>Read ASD fieldspec spectrometer data export into into simplerspec
spectra tibble.</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="read_asd_bin.html">read_asd_bin()</a></code> </p>
</td>
<td><p>Read ASD binary files and gather spectra and metadata in tibble data
frame.</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="read_opus_bin_univ.html">read_opus_bin_univ()</a></code> </p>
</td>
<td><p>Read a Bruker OPUS spectrum binary file</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="read_opus_univ.html">read_opus_univ()</a></code> </p>
</td>
<td><p>Read a list of Bruker OPUS spectrum binary files.</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="remove_outliers.html">remove_outliers()</a></code> </p>
</td>
<td><p>Remove outlier spectra</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="resample_spc.html">resample_spc()</a></code> </p>
</td>
<td><p>Resample spectra in list-column to new x-axis interval</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="select_ref_spc.html">select_ref_spc()</a></code> </p>
</td>
<td><p>Select a set of reference spectra to be measured by reference analysis
methods</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="select_spc_vars.html">select_spc_vars()</a></code> </p>
</td>
<td><p>Select every n-th spectral variable for all spectra and x-values in spectral
tibble (<code>spc_tbl</code>)</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="slice_xvalues.html">slice_xvalues()</a></code> </p>
</td>
<td><p>Slice spectra into defined x-axis ranges</p></td>
</tr><tr>
<td>
</tr><tr><td>
<p><code><a href="split_df2l.html">split_df2l()</a></code> </p>
</td>
<td><p>Split a tibble data frame into a list of tibbles by a group column</p></td>
</tr>
</tbody>
</table>
</div>
</tr></tbody></table></div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

160
dev/reference/join_chem_spec.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Join chemical and spectral data frames — join_chem_spec • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Join chemical and spectral data frames — join_chem_spec" />
<meta property="og:description" content="Combines spectral data (data.frame) and chemical
data (data.frame)." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Join chemical and spectral data frames — join_chem_spec • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Join chemical and spectral data frames — join_chem_spec"><meta property="og:description" content="Combines spectral data (data.frame) and chemical
data (data.frame)."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ data (data.frame)." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Join chemical and spectral data frames</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/join-chem-spectra.R'><code>R/join-chem-spectra.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/join-chem-spectra.R" class="external-link"><code>R/join-chem-spectra.R</code></a></small>
<div class="hidden name"><code>join_chem_spec.Rd</code></div>
</div>
@ -122,55 +54,53 @@ data (data.frame)." />
data (data.frame).</p>
</div>
<pre class="usage"><span class='fu'>join_chem_spec</span>(<span class='no'>dat_chem</span>, <span class='no'>dat_spec</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='st'>"sample_ID"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>dat_chem</th>
<td><p>data.frame that contains chemical values of
the sample</p></td>
</tr>
<tr>
<th>dat_spec</th>
<td><p>List that contains spectral data</p></td>
</tr>
<tr>
<th>by</th>
<td><p>character of column name that defines sample_ID</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>List: xxx</p>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">join_chem_spec</span><span class="op">(</span><span class="va">dat_chem</span>, <span class="va">dat_spec</span>, by <span class="op">=</span> <span class="st">"sample_ID"</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>dat_chem</dt>
<dd><p>data.frame that contains chemical values of
the sample</p></dd>
<dt>dat_spec</dt>
<dd><p>List that contains spectral data</p></dd>
<dt>by</dt>
<dd><p>character of column name that defines sample_ID</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>List: xxx</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

160
dev/reference/join_spc_chem.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Join spectra data and chemical data tibbles — join_spc_chem • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Join spectra data and chemical data tibbles — join_spc_chem" />
<meta property="og:description" content="Combines spectral data (tibble class) and chemical
data (tibble class)." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Join spectra data and chemical data tibbles — join_spc_chem • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Join spectra data and chemical data tibbles — join_spc_chem"><meta property="og:description" content="Combines spectral data (tibble class) and chemical
data (tibble class)."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ data (tibble class)." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Join spectra data and chemical data tibbles</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/join-chem-spectra.R'><code>R/join-chem-spectra.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/join-chem-spectra.R" class="external-link"><code>R/join-chem-spectra.R</code></a></small>
<div class="hidden name"><code>join_spc_chem.Rd</code></div>
</div>
@ -122,55 +54,53 @@ data (tibble class)." />
data (tibble class).</p>
</div>
<pre class="usage"><span class='fu'>join_spc_chem</span>(<span class='no'>spc_tbl</span>, <span class='no'>chem_tbl</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble that contains spectral data</p></td>
</tr>
<tr>
<th>chem_tbl</th>
<td><p>Tibble that contains chemical reference values of
the samples</p></td>
</tr>
<tr>
<th>by</th>
<td><p>character of column name that defines sample_ID</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Tibble joined by sample_id</p>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">join_spc_chem</span><span class="op">(</span><span class="va">spc_tbl</span>, <span class="va">chem_tbl</span>, by <span class="op">=</span> <span class="st">"sample_id"</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble that contains spectral data</p></dd>
<dt>chem_tbl</dt>
<dd><p>Tibble that contains chemical reference values of
the samples</p></dd>
<dt>by</dt>
<dd><p>character of column name that defines sample_ID</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Tibble joined by sample_id</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

191
dev/reference/merge_dts.html

@ -1,70 +1,15 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Merge list-columns of spectra, x-axis values, metadata and additional
measured variables into a single long form data.table — merge_dts • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Merge list-columns of spectra, x-axis values, metadata and additional
measured variables into a single long form data.table — merge_dts" />
<meta property="og:description" content="Helper function that merges all spectra and related data into
a single long form data.table than can subsequently be used for plotting." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Merge list-columns of spectra, x-axis values, metadata and additional
measured variables into a single long form data.table — merge_dts • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Merge list-columns of spectra, x-axis values, metadata and additional
measured variables into a single long form data.table — merge_dts"><meta property="og:description" content="Helper function that merges all spectra and related data into
a single long form data.table than can subsequently be used for plotting."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -80,43 +25,30 @@ a single long form data.table than can subsequently be used for plotting." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Merge list-columns of spectra, x-axis values, metadata and additional
measured variables into a single long form data.table</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/plot-spc-extended.R'><code>R/plot-spc-extended.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/plot-spc-extended.R" class="external-link"><code>R/plot-spc-extended.R</code></a></small>
<div class="hidden name"><code>merge_dts.Rd</code></div>
</div>
@ -125,72 +57,75 @@ measured variables into a single long form data.table</h1>
a single long form data.table than can subsequently be used for plotting.</p>
</div>
<pre class="usage"><span class='fu'>merge_dts</span>(<span class='no'>spc_tbl</span>, <span class='kw'>lcols_spc</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"spc"</span>, <span class='st'>"spc_pre"</span>), <span class='kw'>lcol_measure</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>spc_id</span> <span class='kw'>=</span> <span class='st'>"unique_id"</span>, <span class='kw'>group_id</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble data frame containing spectra, x-axis values, metadata
and eventual measured variables as list-columns.</p></td>
</tr>
<tr>
<th>lcols_spc</th>
<td><p>Character vector of spectral list-columns to be extracted.
Default is <code><a href='https://rdrr.io/r/base/c.html'>c("spc", "spc_pre")</a></code> (raw and preprocessed spectra).</p></td>
</tr>
<tr>
<th>lcol_measure</th>
<td><p>Character vector of length 1 denoting the column name
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">merge_dts</span><span class="op">(</span></span>
<span> <span class="va">spc_tbl</span>,</span>
<span> lcols_spc <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"spc"</span>, <span class="st">"spc_pre"</span><span class="op">)</span>,</span>
<span> lcol_measure <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> spc_id <span class="op">=</span> <span class="st">"unique_id"</span>,</span>
<span> group_id <span class="op">=</span> <span class="st">"sample_id"</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble data frame containing spectra, x-axis values, metadata
and eventual measured variables as list-columns.</p></dd>
<dt>lcols_spc</dt>
<dd><p>Character vector of spectral list-columns to be extracted.
Default is <code>c("spc", "spc_pre")</code> (raw and preprocessed spectra).</p></dd>
<dt>lcol_measure</dt>
<dd><p>Character vector of length 1 denoting the column name
of the measure columns. This argument is optional. Default is <code>NULL</code>,
which does not extract an additional measure column.</p></td>
</tr>
<tr>
<th>spc_id</th>
<td><p>Character vector of column that contains a unique spectral
identifier for all spectra. Default is <code>"unique_id"</code>.</p></td>
</tr>
<tr>
<th>group_id</th>
<td><p>Character vector of columns that is used assigning spectra
which does not extract an additional measure column.</p></dd>
<dt>spc_id</dt>
<dd><p>Character vector of column that contains a unique spectral
identifier for all spectra. Default is <code>"unique_id"</code>.</p></dd>
<dt>group_id</dt>
<dd><p>Character vector of columns that is used assigning spectra
into groups. Default is <code>"sample_id"</code>. The <code>group_id</code> can be
used for later plotting and thereby visually separating spectral groups into
using different colors or panels.</p></td>
</tr>
</table>
using different colors or panels.</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A single data.table containing long form aggregated data of
<p>A single data.table containing long form aggregated data of
spectra, x-axis values, metadata and an additionally measured variable.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

191
dev/reference/merge_dts_l.html

@ -1,72 +1,17 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wrapper function around <code>merge_dts()</code> for list of tibbles to
aggregate data for plotting. — merge_dts_l • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Wrapper function around <code>merge_dts()</code> for list of tibbles to
aggregate data for plotting. — merge_dts_l" />
<meta property="og:description" content="Instead of a single spectral tibble (data frame) multiple
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Wrapper function around merge_dts() for list of tibbles to
aggregate data for plotting. — merge_dts_l • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Wrapper function around merge_dts() for list of tibbles to
aggregate data for plotting. — merge_dts_l"><meta property="og:description" content="Instead of a single spectral tibble (data frame) multiple
spectral tibbles can be merged into a long-form data.table for plotting
spectra and related data. For details, see
merge_dts." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
merge_dts."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -82,43 +27,30 @@ merge_dts." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Wrapper function around <code>merge_dts()</code> for list of tibbles to
aggregate data for plotting.</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/plot-spc-extended.R'><code>R/plot-spc-extended.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/plot-spc-extended.R" class="external-link"><code>R/plot-spc-extended.R</code></a></small>
<div class="hidden name"><code>merge_dts_l.Rd</code></div>
</div>
@ -126,76 +58,79 @@ aggregate data for plotting.</h1>
<p>Instead of a single spectral tibble (data frame) multiple
spectral tibbles can be merged into a long-form data.table for plotting
spectra and related data. For details, see
<code><a href='merge_dts.html'>merge_dts</a></code>.</p>
<code><a href="merge_dts.html">merge_dts</a></code>.</p>
</div>
<pre class="usage"><span class='fu'>merge_dts_l</span>(<span class='no'>spc_tbl_l</span>, <span class='kw'>lcols_spc</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"spc"</span>, <span class='st'>"spc_pre"</span>), <span class='kw'>lcol_measure</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>spc_id</span> <span class='kw'>=</span> <span class='st'>"unique_id"</span>, <span class='kw'>group_id</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl_l</th>
<td><p>List of spectral tibbles (data frames).</p></td>
</tr>
<tr>
<th>lcols_spc</th>
<td><p>Character vector of spectral list-columns to be extracted.
Default is <code><a href='https://rdrr.io/r/base/c.html'>c("spc", "spc_pre")</a></code> (raw and preprocessed spectra).</p></td>
</tr>
<tr>
<th>lcol_measure</th>
<td><p>Character vector of length 1 denoting the column name
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">merge_dts_l</span><span class="op">(</span></span>
<span> <span class="va">spc_tbl_l</span>,</span>
<span> lcols_spc <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"spc"</span>, <span class="st">"spc_pre"</span><span class="op">)</span>,</span>
<span> lcol_measure <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> spc_id <span class="op">=</span> <span class="st">"unique_id"</span>,</span>
<span> group_id <span class="op">=</span> <span class="st">"sample_id"</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl_l</dt>
<dd><p>List of spectral tibbles (data frames).</p></dd>
<dt>lcols_spc</dt>
<dd><p>Character vector of spectral list-columns to be extracted.
Default is <code>c("spc", "spc_pre")</code> (raw and preprocessed spectra).</p></dd>
<dt>lcol_measure</dt>
<dd><p>Character vector of length 1 denoting the column name
of the measure columns. This argument is optional. Default is <code>NULL</code>,
which does not extract an additional measure column.</p></td>
</tr>
<tr>
<th>spc_id</th>
<td><p>Character vector of column that contains a unique spectral
identifier for all spectra. Default is <code>"unique_id"</code>.</p></td>
</tr>
<tr>
<th>group_id</th>
<td><p>Character vector of columns that is used assigning spectra
which does not extract an additional measure column.</p></dd>
<dt>spc_id</dt>
<dd><p>Character vector of column that contains a unique spectral
identifier for all spectra. Default is <code>"unique_id"</code>.</p></dd>
<dt>group_id</dt>
<dd><p>Character vector of columns that is used assigning spectra
into groups. Default is <code>"sample_id"</code>. The <code>group_id</code> can be
used for later plotting and thereby visually separating spectral groups into
using different colors or panels.</p></td>
</tr>
</table>
using different colors or panels.</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A single data.table containing long form aggregated data of
<p>A single data.table containing long form aggregated data of
spectra, x-axis values, metadata and an additionally measured variable.
An additional column called <code>group_id_tbl</code> is appended. It denotes
the name of the spectral tibble supplied with the list <code>spc_tbl_l</code>.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

115
dev/reference/pipe.html

@ -1,67 +1,12 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pipe operator — %&gt;% • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Pipe operator — %&gt;%" />
<meta property="og:description" content="See magrittr::%&amp;gt;% for details." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Pipe operator — %&gt;% • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Pipe operator — %&gt;%"><meta property="og:description" content="See magrittr::%&amp;gt;% for details."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -77,42 +22,29 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Pipe operator</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/utils-pipe.R'><code>R/utils-pipe.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/utils-pipe.R" class="external-link"><code>R/utils-pipe.R</code></a></small>
<div class="hidden name"><code>pipe.Rd</code></div>
</div>
@ -120,35 +52,32 @@
<p>See <code>magrittr::%&gt;%</code> for details.</p>
</div>
<pre class="usage"><span class='no'>lhs</span> <span class='kw'>%&gt;%</span> <span class='no'>rhs</span></pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">lhs</span> <span class="op">%&gt;%</span> <span class="va">rhs</span></span></code></pre></div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

217
dev/reference/plot_pls_vip.html

@ -1,78 +1,23 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plot stacked ggplot2 graphs with the Variable Importance for the
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Plot stacked ggplot2 graphs with the Variable Importance for the
Projection (VIP) scores, mean replicate spectra (absorbance) per sample_id,
and the preprocessed spectra. — plot_pls_vip • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Plot stacked ggplot2 graphs with the Variable Importance for the
and the preprocessed spectra. — plot_pls_vip • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Plot stacked ggplot2 graphs with the Variable Importance for the
Projection (VIP) scores, mean replicate spectra (absorbance) per sample_id,
and the preprocessed spectra. — plot_pls_vip" />
<meta property="og:description" content="Plot stacked ggplot2 graphs of VIP for the final
and the preprocessed spectra. — plot_pls_vip"><meta property="og:description" content="Plot stacked ggplot2 graphs of VIP for the final
PLS regression model output of the calibration (training) data set for the
final number of components, raw (replicate mean) spectra, and preprocessed
spectra. Regions with VIP &amp;gt; 1 are highlighted across the stacked graphs
in beige colour rectangles. VIP calculation is implemented as described in
Chong, I.-G., and Jun, C.-H. (2005). Performance of some variable selection
methods when multicollinearity is present. Chemometrics and Intelligent
Laboratory Systems, 78(1--2), 103--112. https://doi.org/10.1016/j.chemolab.2004.12.011" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
Laboratory Systems, 78(1--2), 103--112. https://doi.org/10.1016/j.chemolab.2004.12.011"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -88,44 +33,31 @@ Laboratory Systems, 78(1--2), 103--112. https://doi.org/10.1016/j.chemolab.2004.
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Plot stacked ggplot2 graphs with the Variable Importance for the
Projection (VIP) scores, mean replicate spectra (absorbance) per sample_id,
and the preprocessed spectra.</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/pls-vip.R'><code>R/pls-vip.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/pls-vip.R" class="external-link"><code>R/pls-vip.R</code></a></small>
<div class="hidden name"><code>plot_pls_vip.Rd</code></div>
</div>
@ -140,89 +72,84 @@ methods when multicollinearity is present. Chemometrics and Intelligent
Laboratory Systems, 78(1--2), 103--112. https://doi.org/10.1016/j.chemolab.2004.12.011</p>
</div>
<pre class="usage"><span class='fu'>plot_pls_vip</span>(<span class='no'>mout</span>, <span class='kw'>y1</span> <span class='kw'>=</span> <span class='st'>"spc_mean"</span>, <span class='kw'>y2</span> <span class='kw'>=</span> <span class='st'>"spc_pre"</span>,
<span class='kw'>by</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>,
<span class='kw'>xlab</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/expression.html'>expression</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Wavenumber ["</span>, <span class='no'>cm</span>^-<span class='fl'>1</span>, <span class='st'>"]"</span>)),
<span class='kw'>ylab1</span> <span class='kw'>=</span> <span class='st'>"Absorbance"</span>, <span class='kw'>ylab2</span> <span class='kw'>=</span> <span class='st'>"Preprocessed Abs."</span>,
<span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.2</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>mout</th>
<td><p>Model output list that is returned from
<code><a href='fit_pls.html'>simplerspec::fit_pls()</a></code>. This object contains a nested list with
the <code><a href='https://rdrr.io/pkg/caret/man/train.html'>caret::train()</a></code> object (class <code>train</code>), based on which
VIPs at finally selected number of PLS components are computed.</p></td>
</tr>
<tr>
<th>y1</th>
<td><p>Character vector of list-column name in
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">plot_pls_vip</span><span class="op">(</span><span class="va">mout</span>, y1 <span class="op">=</span> <span class="st">"spc_mean"</span>, y2 <span class="op">=</span> <span class="st">"spc_pre"</span>,</span>
<span> by <span class="op">=</span> <span class="st">"sample_id"</span>,</span>
<span> xlab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/expression.html" class="external-link">expression</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="st">"Wavenumber ["</span>, <span class="va">cm</span><span class="op">^</span><span class="op">-</span><span class="fl">1</span>, <span class="st">"]"</span><span class="op">)</span><span class="op">)</span>,</span>
<span> ylab1 <span class="op">=</span> <span class="st">"Absorbance"</span>, ylab2 <span class="op">=</span> <span class="st">"Preprocessed Abs."</span>,</span>
<span> alpha <span class="op">=</span> <span class="fl">0.2</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>mout</dt>
<dd><p>Model output list that is returned from
<code><a href="fit_pls.html">simplerspec::fit_pls()</a></code>. This object contains a nested list with
the <code><a href="https://rdrr.io/pkg/caret/man/train.html" class="external-link">caret::train()</a></code> object (class <code>train</code>), based on which
VIPs at finally selected number of PLS components are computed.</p></dd>
<dt>y1</dt>
<dd><p>Character vector of list-column name in
<code>mout$data$calibration</code>, where spectra for bottom graph are extracted.
Default is <code>"spc_mean"</code>, which plots the mean calibration spectra after
resampling.</p></td>
</tr>
<tr>
<th>y2</th>
<td><p>Character string of list-column name in
resampling.</p></dd>
<dt>y2</dt>
<dd><p>Character string of list-column name in
<code>mout$data$calibration</code>, where spectra for bottom graph are extracted.
Default is <code>"spc_pre"</code>, which plots the preprocessed calibration
spectra after resampling.</p></td>
</tr>
<tr>
<th>by</th>
<td><p>Character string that is used to assign spectra to the same group
spectra after resampling.</p></dd>
<dt>by</dt>
<dd><p>Character string that is used to assign spectra to the same group
and therefore ensures that all spectra are plotted with the same colour.
Default is <code>"sample_id"</code></p></td>
</tr>
<tr>
<th>xlab</th>
<td><p>Character string of X axis title for shared x axis of stacked
graphs. Default is <code><a href='https://rdrr.io/r/base/expression.html'>expression(paste("Wavenumber [", cm^-1, "]"))</a></code></p></td>
</tr>
<tr>
<th>ylab1</th>
<td><p>Y axis title of bottom spectrum. Default is <code>"Absorbance"</code>.</p></td>
</tr>
<tr>
<th>ylab2</th>
<td><p>Y axis title of bottom spectrum. Default is
<code>"Preprocessed Abs."</code>.</p></td>
</tr>
<tr>
<th>alpha</th>
<td><p>Double between 0 and 1 that defines transparency of spectra
lines in returned graph (ggplot plot object).</p></td>
</tr>
</table>
Default is <code>"sample_id"</code></p></dd>
<dt>xlab</dt>
<dd><p>Character string of X axis title for shared x axis of stacked
graphs. Default is <code>expression(paste("Wavenumber [", cm^-1, "]"))</code></p></dd>
<dt>ylab1</dt>
<dd><p>Y axis title of bottom spectrum. Default is <code>"Absorbance"</code>.</p></dd>
<dt>ylab2</dt>
<dd><p>Y axis title of bottom spectrum. Default is
<code>"Preprocessed Abs."</code>.</p></dd>
<dt>alpha</dt>
<dd><p>Double between 0 and 1 that defines transparency of spectra
lines in returned graph (ggplot plot object).</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

272
dev/reference/plot_spc.html

@ -1,67 +1,12 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plot tibble spectra — plot_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Plot tibble spectra — plot_spc" />
<meta property="og:description" content="Plot spectra from tibble spectra objects." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Plot tibble spectra — plot_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Plot tibble spectra — plot_spc"><meta property="og:description" content="Plot spectra from tibble spectra objects."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -77,42 +22,29 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Plot tibble spectra</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/plot_spc.R'><code>R/plot_spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/plot_spc.R" class="external-link"><code>R/plot_spc.R</code></a></small>
<div class="hidden name"><code>plot_spc.Rd</code></div>
</div>
@ -120,129 +52,117 @@
<p>Plot spectra from tibble spectra objects.</p>
</div>
<pre class="usage"><span class='fu'>plot_spc</span>(<span class='no'>spc_tbl</span>, <span class='kw'>spc_tbl_2</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>x_unit</span> <span class='kw'>=</span> <span class='st'>"wavenumber"</span>,
<span class='kw'>y</span> <span class='kw'>=</span> <span class='st'>"spc"</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='st'>"unique_id"</span>,
<span class='kw'>graph_id_1</span> <span class='kw'>=</span> <span class='st'>"Set 1"</span>, <span class='kw'>graph_id_2</span> <span class='kw'>=</span> <span class='st'>"Set 2"</span>,
<span class='kw'>graph_id_1_col</span> <span class='kw'>=</span> <span class='st'>"black"</span>, <span class='kw'>graph_id_2_col</span> <span class='kw'>=</span> <span class='st'>"red"</span>,
<span class='kw'>xlab</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/expression.html'>expression</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Wavenumber ["</span>, <span class='no'>cm</span>^-<span class='fl'>1</span>, <span class='st'>"]"</span>)),
<span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Absorbance"</span>,
<span class='kw'>slice</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble that contains the first set of spectra to plot as
list-column</p></td>
</tr>
<tr>
<th>spc_tbl_2</th>
<td><p>Tibble that contains the second set of spectra (optional)
to plot as list-column.</p></td>
</tr>
<tr>
<th>x_unit</th>
<td><p>Character string describing the x axis unit. Default is
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">plot_spc</span><span class="op">(</span><span class="va">spc_tbl</span>, spc_tbl_2 <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> x_unit <span class="op">=</span> <span class="st">"wavenumber"</span>,</span>
<span> y <span class="op">=</span> <span class="st">"spc"</span>, by <span class="op">=</span> <span class="st">"unique_id"</span>,</span>
<span> graph_id_1 <span class="op">=</span> <span class="st">"Set 1"</span>, graph_id_2 <span class="op">=</span> <span class="st">"Set 2"</span>,</span>
<span> graph_id_1_col <span class="op">=</span> <span class="st">"black"</span>, graph_id_2_col <span class="op">=</span> <span class="st">"red"</span>,</span>
<span> xlab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/expression.html" class="external-link">expression</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="st">"Wavenumber ["</span>, <span class="va">cm</span><span class="op">^</span><span class="op">-</span><span class="fl">1</span>, <span class="st">"]"</span><span class="op">)</span><span class="op">)</span>,</span>
<span> ylab <span class="op">=</span> <span class="st">"Absorbance"</span>,</span>
<span> alpha <span class="op">=</span> <span class="fl">0.2</span>, legend <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble that contains the first set of spectra to plot as
list-column</p></dd>
<dt>spc_tbl_2</dt>
<dd><p>Tibble that contains the second set of spectra (optional)
to plot as list-column.</p></dd>
<dt>x_unit</dt>
<dd><p>Character string describing the x axis unit. Default is
<code>"wavenumber"</code>, which will produce a graph with wavenumbers on the
x axis with reversed number. If <code>x_unit = "wavelength"</code>, the axis
will be in regular order (lower wavelengths in nm on the left and higher
on the right side of the axis).</p></td>
</tr>
<tr>
<th>y</th>
<td><p>Character string of list-column name in tibble where spectra of
desired type are extracted to plot.</p></td>
</tr>
<tr>
<th>by</th>
<td><p>Character string of column that is used to group the spectra.
on the right side of the axis).</p></dd>
<dt>y</dt>
<dd><p>Character string of list-column name in tibble where spectra of
desired type are extracted to plot.</p></dd>
<dt>by</dt>
<dd><p>Character string of column that is used to group the spectra.
Default is <code>"unique_id"</code>. If replica spectra are present in the file
and processed spectra resulting after averaging need to be plotted,
it is recommend to use <code>"sample_id"</code> as argument to group according
the sample_id column in the tibble(s) containing the spectra (<code>spc_tbl</code>
and <code>spc_tbl_2</code>).</p></td>
</tr>
<tr>
<th>graph_id_1</th>
<td><p>Character string used for grouping the first spectra set
and <code>spc_tbl_2</code>).</p></dd>
<dt>graph_id_1</dt>
<dd><p>Character string used for grouping the first spectra set
(<code>spc_tbl</code>) and producing
the label text accordingly. Default is <code>"Set 1"</code>.</p></td>
</tr>
<tr>
<th>graph_id_2</th>
<td><p>Character string used for grouping the second spectra set
the label text accordingly. Default is <code>"Set 1"</code>.</p></dd>
<dt>graph_id_2</dt>
<dd><p>Character string used for grouping the second spectra set
(<code>spc_tbl_2</code>) and producing the label text accordingly. Default is
<code>"Set 2"</code></p></td>
</tr>
<tr>
<th>graph_id_1_col</th>
<td><p>Character string for the colour of the first spectra
set. Default is <code>"black"</code>.</p></td>
</tr>
<tr>
<th>graph_id_2_col</th>
<td><p>Character string for the colour of the first spectra
set. Default is <code>"red"</code>.</p></td>
</tr>
<tr>
<th>xlab</th>
<td><p>Character string or mathematical expression
<code>"Set 2"</code></p></dd>
<dt>graph_id_1_col</dt>
<dd><p>Character string for the colour of the first spectra
set. Default is <code>"black"</code>.</p></dd>
<dt>graph_id_2_col</dt>
<dd><p>Character string for the colour of the first spectra
set. Default is <code>"red"</code>.</p></dd>
<dt>xlab</dt>
<dd><p>Character string or mathematical expression
(use <code>expression</code>) for the x axis title. Default is
<code><a href='https://rdrr.io/r/base/expression.html'>expression(paste("Wavenumber [", cm^-1, "]"))</a></code>.</p></td>
</tr>
<tr>
<th>ylab</th>
<td><p>Character string or mathematical expression
(use <code>expression</code>) for the y axis title. Default is <code>"absorbance"</code>.</p></td>
</tr>
<tr>
<th>slice</th>
<td><p>Logical whether to slice the data sets (select rows by position).
Default is <code>TRUE</code>.
This argument will soon be supported to group spectra based id variables present
in spc_tbl such as the `sample_id` and slicing the data set prior to plotting.</p></td>
</tr>
<tr>
<th>alpha</th>
<td><p>Double in between 0 and 1. Sets the transparency for the plotted
spectra lines.</p></td>
</tr>
<tr>
<th>legend</th>
<td><p>Logical whether to plot a legend for the spectra describing
<code>expression(paste("Wavenumber [", cm^-1, "]"))</code>.</p></dd>
<dt>ylab</dt>
<dd><p>Character string or mathematical expression
(use <code>expression</code>) for the y axis title. Default is <code>"absorbance"</code>.</p></dd>
<dt>alpha</dt>
<dd><p>Double in between 0 and 1. Sets the transparency for the plotted
spectra lines.</p></dd>
<dt>legend</dt>
<dd><p>Logical whether to plot a legend for the spectra describing
its name selected in arguments <code>graph_id_1</code> and <code>graph_id_2</code>.
Default is <code>TRUE</code>.</p></td>
</tr>
</table>
Default is <code>TRUE</code>.</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

360
dev/reference/plot_spc_ext.html

@ -1,72 +1,17 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ggplot2 wrapper for extended spectra plotting — plot_spc_ext • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="ggplot2 wrapper for extended spectra plotting — plot_spc_ext" />
<meta property="og:description" content="plot_spc_ext is a custom plotting function developed
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ggplot2 wrapper for extended spectra plotting — plot_spc_ext • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="ggplot2 wrapper for extended spectra plotting — plot_spc_ext"><meta property="og:description" content='plot_spc_ext is a custom plotting function developed
within the simplerspec framework. Returns plots based on ggplot2
(class &quot;ggplot&quot;). Different spectra types such as raw or preprocessed spectra
(class "ggplot"). Different spectra types such as raw or preprocessed spectra
and groups can be differentiated by different colors or by using panels
(so called facets). Additionally, spectra can be colored based on an
additional measure variable, e.g. determined by chemical reference analysis." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
additional measure variable, e.g. determined by chemical reference analysis.'><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -82,42 +27,29 @@ additional measure variable, e.g. determined by chemical reference analysis." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>ggplot2 wrapper for extended spectra plotting</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/plot-spc-extended.R'><code>R/plot-spc-extended.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/plot-spc-extended.R" class="external-link"><code>R/plot-spc-extended.R</code></a></small>
<div class="hidden name"><code>plot_spc_ext.Rd</code></div>
</div>
@ -130,155 +62,167 @@ and groups can be differentiated by different colors or by using panels
additional measure variable, e.g. determined by chemical reference analysis.</p>
</div>
<pre class="usage"><span class='fu'>plot_spc_ext</span>(<span class='no'>spc_tbl</span>, <span class='kw'>spc_tbl_l</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>lcols_spc</span> <span class='kw'>=</span> <span class='st'>"spc"</span>,
<span class='kw'>lcol_measure</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>lcol_measure_col_palette</span> <span class='kw'>=</span> <span class='st'>"Spectral"</span>,
<span class='kw'>lcol_measure_col_direction</span> <span class='kw'>=</span> -<span class='fl'>1</span>, <span class='kw'>spc_id</span> <span class='kw'>=</span> <span class='st'>"unique_id"</span>,
<span class='kw'>group_id</span> <span class='kw'>=</span> <span class='st'>"sample_id"</span>, <span class='kw'>group_id_order</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>group_color</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>group_color_palette</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>group_panel</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>group_legend</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>ncol</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>relabel_spc</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Spectrum value"</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
<span class='kw'>line_width</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble data frame containing spectra, x-axis values, metadata
and eventual measured variables as list-columns.</p></td>
</tr>
<tr>
<th>spc_tbl_l</th>
<td><p>List of spectral tibbles (data frames). Default is
<code>NULL</code> (argument is not used).</p></td>
</tr>
<tr>
<th>lcols_spc</th>
<td><p>Character vector of spectral list-columns to be extracted.
Default is <code>"spc"</code> (raw spectra).</p></td>
</tr>
<tr>
<th>lcol_measure</th>
<td><p>Character vector of length 1 denoting the column name
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">plot_spc_ext</span><span class="op">(</span></span>
<span> <span class="va">spc_tbl</span>,</span>
<span> spc_tbl_l <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> lcols_spc <span class="op">=</span> <span class="st">"spc"</span>,</span>
<span> lcol_measure <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> lcol_measure_col_palette <span class="op">=</span> <span class="st">"Spectral"</span>,</span>
<span> lcol_measure_col_direction <span class="op">=</span> <span class="op">-</span><span class="fl">1</span>,</span>
<span> spc_id <span class="op">=</span> <span class="st">"unique_id"</span>,</span>
<span> group_id <span class="op">=</span> <span class="st">"sample_id"</span>,</span>
<span> group_id_order <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> group_color <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> group_color_palette <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> group_panel <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> group_legend <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> ncol <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> relabel_spc <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> ylab <span class="op">=</span> <span class="st">"Spectrum value"</span>,</span>
<span> alpha <span class="op">=</span> <span class="fl">0.5</span>,</span>
<span> line_width <span class="op">=</span> <span class="fl">0.2</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble data frame containing spectra, x-axis values, metadata
and eventual measured variables as list-columns.</p></dd>
<dt>spc_tbl_l</dt>
<dd><p>List of spectral tibbles (data frames). Default is
<code>NULL</code> (argument is not used).</p></dd>
<dt>lcols_spc</dt>
<dd><p>Character vector of spectral list-columns to be extracted.
Default is <code>"spc"</code> (raw spectra).</p></dd>
<dt>lcol_measure</dt>
<dd><p>Character vector of length 1 denoting the column name
of the measure columns. This argument is optional. Default is <code>NULL</code>,
which does not extract an additional measure column.</p></td>
</tr>
<tr>
<th>lcol_measure_col_palette</th>
<td><p>Palette value supplied to
`ggplot::scale_colour_brewer()`. Default is `"Spectral"`, but you can set
it to the default argument `1` (will use
`scale_colour_brewer(..., palette = 1)`).</p></td>
</tr>
<tr>
<th>lcol_measure_col_direction</th>
<td><p>Sets the the order of colours in the scale
which does not extract an additional measure column.</p></dd>
<dt>lcol_measure_col_palette</dt>
<dd><p>Palette value supplied to
<code>ggplot::scale_colour_brewer()</code>. Default is <code>"Spectral"</code>, but you can set
it to the default argument <code>1</code> (will use
<code>scale_colour_brewer(..., palette = 1)</code>).</p></dd>
<dt>lcol_measure_col_direction</dt>
<dd><p>Sets the the order of colours in the scale
that is based on a measure column. Default is <code>-1</code> which reverses the
scale. Argument is passed on to the function `ggplot2::sclae_colour_brewer()`
as argument `direction`.</p></td>
</tr>
<tr>
<th>spc_id</th>
<td><p>Character vector denoting column name for a unique spectrum ID.
Default is <code>"unique_id"</code>.</p></td>
</tr>
<tr>
<th>group_id</th>
<td><p>Character vector denoting column name for the spectrum group
scale. Argument is passed on to the function <code>ggplot2::sclae_colour_brewer()</code>
as argument <code>direction</code>.</p></dd>
<dt>spc_id</dt>
<dd><p>Character vector denoting column name for a unique spectrum ID.
Default is <code>"unique_id"</code>.</p></dd>
<dt>group_id</dt>
<dd><p>Character vector denoting column name for the spectrum group
ID. Default is <code>"sample_id"</code>. The group ID is used for
plotting spectra by group (e.g. by using different colors or panels).</p></td>
</tr>
<tr>
<th>group_id_order</th>
<td><p>Logical that specifies whether the panel names
plotting spectra by group (e.g. by using different colors or panels).</p></dd>
<dt>group_id_order</dt>
<dd><p>Logical that specifies whether the panel names
derived from a numeric <code>group_id</code> column are reordered using ascending
numbers. Default is <code>TRUE</code>.</p></td>
</tr>
<tr>
<th>group_color</th>
<td><p>Logical defining whether spectra are colored by the column
specified by <code>group_id</code>.</p></td>
</tr>
<tr>
<th>group_color_palette</th>
<td><p>Character (1L) defining the diverging colour
scales from colorbrewer.org; see `?scale_colour_brewer` for supported
diverging colur types (`palette` argument).</p></td>
</tr>
<tr>
<th>group_panel</th>
<td><p>Logical defining whether spectra are arranged into panels
by groups specified in <code>group_id</code>. Default is <code>TRUE</code>.</p></td>
</tr>
<tr>
<th>group_legend</th>
<td><p>Logical defining whether a legend for the <code>group_id</code>
is plotted. Default is <code>FALSE</code>.</p></td>
</tr>
<tr>
<th>ncol</th>
<td><p>Integer vector of length 1. Defines number of columns when
plotting panels (facets). Default is <code>NULL</code> (argument not used).</p></td>
</tr>
<tr>
<th>relabel_spc</th>
<td><p>Logical defining whether panels are relabeled with custom
numbers. Default is <code>TRUE</code>.</p></dd>
<dt>group_color</dt>
<dd><p>Logical defining whether spectra are colored by the column
specified by <code>group_id</code>.</p></dd>
<dt>group_color_palette</dt>
<dd><p>Character (1L) defining the diverging colour
scales from colorbrewer.org; see <code>?scale_colour_brewer</code> for supported
diverging colur types (<code>palette</code> argument).</p></dd>
<dt>group_panel</dt>
<dd><p>Logical defining whether spectra are arranged into panels
by groups specified in <code>group_id</code>. Default is <code>TRUE</code>.</p></dd>
<dt>group_legend</dt>
<dd><p>Logical defining whether a legend for the <code>group_id</code>
is plotted. Default is <code>FALSE</code>.</p></dd>
<dt>ncol</dt>
<dd><p>Integer vector of length 1. Defines number of columns when
plotting panels (facets). Default is <code>NULL</code> (argument not used).</p></dd>
<dt>relabel_spc</dt>
<dd><p>Logical defining whether panels are relabeled with custom
names for spectra types. Default is TRUE. When <code>TRUE</code>, arguments
from <code>relabel_spc_types</code> can be passed to <code>plot_spc_ext</code>
(supported via the <code>...</code> (ellipsis) argument)</p></td>
</tr>
<tr>
<th>ylab</th>
<td><p>Character vector or vector of type <code>"expression"</code> created by
(supported via the <code>...</code> (ellipsis) argument)</p></dd>
<dt>ylab</dt>
<dd><p>Character vector or vector of type <code>"expression"</code> created by
mathematical expression created by <code>expression</code>. Custom annotation for
y-axis of spectra</p></td>
</tr>
<tr>
<th>alpha</th>
<td><p>Integer of length 1, from 0 to 1. Defines transparency of
y-axis of spectra</p></dd>
<dt>alpha</dt>
<dd><p>Integer of length 1, from 0 to 1. Defines transparency of
spectral lines. Default is <code>0.5</code> (0 is completely transparent and
1 is no transparency).</p></td>
</tr>
<tr>
<th>line_width</th>
<td><p>Numeric vector of length 1 specifying the width of the
spectral lines. Default is <code>0.2</code>.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Further arguments to be passed to <code>plot_spc_ext</code>. Currently,
arguments of <code>relabel_spc_types</code> are supported.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Object of class <code>"ggplot"</code> (ggplot2 graph).</p>
1 is no transparency).</p></dd>
<dt>line_width</dt>
<dd><p>Numeric vector of length 1 specifying the width of the
spectral lines. Default is <code>0.2</code>.</p></dd>
<dt>...</dt>
<dd><p>Further arguments to be passed to <code>plot_spc_ext</code>. Currently,
arguments of <code>relabel_spc_types</code> are supported.</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Object of class <code>"ggplot"</code> (ggplot2 graph).</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

162
dev/reference/predict_from_spc.html

@ -1,69 +1,14 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Predict soil properties of new spectra based on a list of calibration models — predict_from_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Predict soil properties of new spectra based on a list of calibration models — predict_from_spc" />
<meta property="og:description" content="Append predictions for a set of responses specified by a list
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Predict soil properties of new spectra based on a list of calibration models — predict_from_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Predict soil properties of new spectra based on a list of calibration models — predict_from_spc"><meta property="og:description" content="Append predictions for a set of responses specified by a list
of calibration models and a tibble containing preprocessed spectra as
list-columns." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
list-columns."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -79,42 +24,29 @@ list-columns." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Predict soil properties of new spectra based on a list of calibration models</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/predict-spc.R'><code>R/predict-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/predict-spc.R" class="external-link"><code>R/predict-spc.R</code></a></small>
<div class="hidden name"><code>predict_from_spc.Rd</code></div>
</div>
@ -124,57 +56,55 @@ of calibration models and a tibble containing preprocessed spectra as
list-columns.</p>
</div>
<pre class="usage"><span class='fu'>predict_from_spc</span>(<span class='no'>model_list</span>, <span class='no'>spc_tbl</span>, <span class='kw'>slice</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>model_list</th>
<td><p>List of model output generated from calibration step
(<code><a href='fit_pls.html'>pls_ken_stone()</a></code></p></td>
</tr>
<tr>
<th>spc_tbl</th>
<td><p>Tibble of spectra after preprocessing
(<code><a href='preprocess_spc.html'>preprocess_spc()</a></code>)</p></td>
</tr>
<tr>
<th>slice</th>
<td><p>Logical expression wheather only one row per sample_id returned.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>tibble with new columns <code>model</code>, and predicted values with
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">predict_from_spc</span><span class="op">(</span><span class="va">model_list</span>, <span class="va">spc_tbl</span>, slice <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>model_list</dt>
<dd><p>List of model output generated from calibration step
(<code><a href="fit_pls.html">pls_ken_stone()</a></code></p></dd>
<dt>spc_tbl</dt>
<dd><p>Tibble of spectra after preprocessing
(<code><a href="preprocess_spc.html">preprocess_spc()</a></code>)</p></dd>
<dt>slice</dt>
<dd><p>Logical expression wheather only one row per sample_id returned.</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>tibble with new columns <code>model</code>, and predicted values with
column names of model list.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

168
dev/reference/preprocess_spc.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Preprocess spectra — preprocess_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Preprocess spectra — preprocess_spc" />
<meta property="og:description" content="Preprocesses spectra in tibble column by sample_id after
averaging spectra by simplerspec::average_spc()." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Preprocess spectra — preprocess_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Preprocess spectra — preprocess_spc"><meta property="og:description" content="Preprocesses spectra in tibble column by sample_id after
averaging spectra by simplerspec::average_spc()."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,117 +23,98 @@ averaging spectra by simplerspec::average_spc()." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Preprocess spectra</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/preprocess-spc.R'><code>R/preprocess-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/preprocess-spc.R" class="external-link"><code>R/preprocess-spc.R</code></a></small>
<div class="hidden name"><code>preprocess_spc.Rd</code></div>
</div>
<div class="ref-description">
<p>Preprocesses spectra in tibble column by sample_id after
averaging spectra by <code><a href='average_spc.html'>simplerspec::average_spc()</a></code>.</p>
averaging spectra by <code><a href="average_spc.html">simplerspec::average_spc()</a></code>.</p>
</div>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">preprocess_spc</span><span class="op">(</span><span class="va">spc_tbl</span>, <span class="va">select</span>, column_in <span class="op">=</span> <span class="st">"spc_mean"</span>, custom_function <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div>
</div>
<pre class="usage"><span class='fu'>preprocess_spc</span>(<span class='no'>spc_tbl</span>, <span class='no'>select</span>, <span class='kw'>column_in</span> <span class='kw'>=</span> <span class='st'>"spc_mean"</span>,
<span class='kw'>custom_function</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble that contains spectra to be preprocessed within
a list-column.</p></td>
</tr>
<tr>
<th>select</th>
<td><p>Character vector of predefined preprocessing options to be
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble that contains spectra to be preprocessed within
a list-column.</p></dd>
<dt>select</dt>
<dd><p>Character vector of predefined preprocessing options to be
applied to the spectra list-column specified in <code>column_in</code>.
Common prefined values are stated as abbreviated preprocessing methods and
options such as <code>"sg_1_w21"</code>, where <code>"sg"</code> stands for
Savitzky-Golay and <code>1</code> for first derivative and <code>"w21"</code>
for a window size of 21 points.</p></td>
</tr>
<tr>
<th>column_in</th>
<td><p>Character vector of single list-column in <code>spc_tbl</code> that
for a window size of 21 points.</p></dd>
<dt>column_in</dt>
<dd><p>Character vector of single list-column in <code>spc_tbl</code> that
contain list of spectra (1 row matrix) to be processed by function supplied
in <code>select</code>.</p></td>
</tr>
<tr>
<th>custom_function</th>
<td><p>A character string of a custom processing function
in <code>select</code>.</p></dd>
<dt>custom_function</dt>
<dd><p>A character string of a custom processing function
that is later parsed (produces expression in a list) and evaluated within
the function <code>preprocess_spc</code>.
the function <code>preprocess_spc</code>.
The character vector argument of <code>custom_function</code>
needs to contain <code>"spc_raw"</code>, which is the single data table of spectra
that results from binding a list of data.tables (spectra to preprocess)
from the spectra list-column specified in <code>column_in</code>.
An example for a value is
<code>"prospectr::savitzkyGolay(X = spc_raw, m = 0, p = 3, w = 9)"</code>.
Optional argument. Default is <code>NULL</code>.</p></td>
</tr>
</table>
Optional argument. Default is <code>NULL</code>.</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

142
dev/reference/read_asd.html

@ -1,74 +1,19 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read ASD fieldspec spectrometer data export into into simplerspec
spectra tibble. — read_asd • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Read ASD fieldspec spectrometer data export into into simplerspec
spectra tibble. — read_asd" />
<meta property="og:description" content="Read tab delimited text (.txt) files exported from ASD field
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Read ASD fieldspec spectrometer data export into into simplerspec
spectra tibble. — read_asd • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Read ASD fieldspec spectrometer data export into into simplerspec
spectra tibble. — read_asd"><meta property="og:description" content="Read tab delimited text (.txt) files exported from ASD field
spectrometer into simplerspec spectra tibble.
ASD Fieldspec data files are expected in .txt tab delimited file format.
The first row should contain
the name 'Wavelength' for the first column and the file names for the
remaining columns." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
remaining columns."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -84,43 +29,30 @@ remaining columns." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Read ASD fieldspec spectrometer data export into into simplerspec
spectra tibble.</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/read-asd.R'><code>R/read-asd.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/read-asd.R" class="external-link"><code>R/read-asd.R</code></a></small>
<div class="hidden name"><code>read_asd.Rd</code></div>
</div>
@ -133,53 +65,51 @@ the name 'Wavelength' for the first column and the file names for the
remaining columns.</p>
</div>
<pre class="usage"><span class='fu'>read_asd</span>(<span class='no'>file</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">read_asd</span><span class="op">(</span><span class="va">file</span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>file</th>
<td><p>Tab delmited file from ASD software export where the first
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>file</dt>
<dd><p>Tab delmited file from ASD software export where the first
column called <code>Wavelength</code> contais wavelengths in nanometer and the
remaining columns are sample spectra referred by an ID name provided in the
first row of these columns.</p></td>
</tr>
</table>
first row of these columns.</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Spectra data in tibble data frame (class `tbl_df`) that contains
<p>Spectra data in tibble data frame (class <code>tbl_df</code>) that contains
columns <code>sample_id</code> (derived from 2nd and following column names of
tab delimited ASD exported text file),
<code>spc</code> (list-column of spectral matrices)
and <code>wavelengths</code> (list-column containing wavelength vectors).</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

173
dev/reference/read_asd_bin.html

@ -1,72 +1,17 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read ASD binary files and gather spectra and metadata in tibble data
frame. — read_asd_bin • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Read ASD binary files and gather spectra and metadata in tibble data
frame. — read_asd_bin" />
<meta property="og:description" content="Read multiple ASD binary files and gather spectra and metadata
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Read ASD binary files and gather spectra and metadata in tibble data
frame. — read_asd_bin • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Read ASD binary files and gather spectra and metadata in tibble data
frame. — read_asd_bin"><meta property="og:description" content="Read multiple ASD binary files and gather spectra and metadata
into a simplerspec spectral tibble (data frame). The resulting spectral
tibble is compatible with the simplerspec spectra processing and modeling
framework." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
framework."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -82,43 +27,30 @@ framework." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Read ASD binary files and gather spectra and metadata in tibble data
frame.</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/read-asd.R'><code>R/read-asd.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/read-asd.R" class="external-link"><code>R/read-asd.R</code></a></small>
<div class="hidden name"><code>read_asd_bin.Rd</code></div>
</div>
@ -129,61 +61,74 @@ tibble is compatible with the simplerspec spectra processing and modeling
framework.</p>
</div>
<pre class="usage"><span class='fu'>read_asd_bin</span>(<span class='no'>fnames</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">read_asd_bin</span><span class="op">(</span><span class="va">fnames</span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>fnames</th>
<td><p>Character vector containing full paths of ASD binary files
to be read</p></td>
</tr>
</table>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>fnames</dt>
<dd><p>Character vector containing full paths of ASD binary files
to be read</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A spectral tibble (data frame) containing the follwing columns:</p>
<dt>unique_id</dt><dd><p>Character vector. Unique identifier containing file name
<p>A spectral tibble (data frame) containing the follwing columns:</p>
<dl><dt>unique_id</dt>
<dd><p>Character vector. Unique identifier containing file name
pasted with date and time.</p></dd>
<dt>file_id</dt><dd><p>Character vector containing file names and exension</p></dd>
<dt>sample_id</dt><dd><p>Character vector containing files names without extension</p></dd>
<dt>metadata</dt><dd><p>List-column. List of data frames containing spectral
<dt>file_id</dt>
<dd><p>Character vector containing file names and exension</p></dd>
<dt>sample_id</dt>
<dd><p>Character vector containing files names without extension</p></dd>
<dt>metadata</dt>
<dd><p>List-column. List of data frames containing spectral
metadata</p></dd>
<dt>wavelengths</dt><dd><p>List-column. List of wavelengths vectors (numeric).</p></dd>
<dt>spc_radiance</dt><dd><p>List-column. List of data.tables containing
<dt>wavelengths</dt>
<dd><p>List-column. List of wavelengths vectors (numeric).</p></dd>
<dt>spc_radiance</dt>
<dd><p>List-column. List of data.tables containing
radiance sample spectra.</p></dd>
<dt>spc_reference</dt><dd><p>List-column. List of data.tables containing
<dt>spc_reference</dt>
<dd><p>List-column. List of data.tables containing
reference reflectance spectra.</p></dd>
<dt>spc</dt><dd><p>List-column. List of data.tables containing final reflectance
<dt>spc</dt>
<dd><p>List-column. List of data.tables containing final reflectance
spectra.</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

165
dev/reference/read_opus_bin_univ.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read a Bruker OPUS spectrum binary file — read_opus_bin_univ • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Read a Bruker OPUS spectrum binary file — read_opus_bin_univ" />
<meta property="og:description" content="Read single binary file acquired with an
Bruker Vertex FTIR Instrument" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Read a Bruker OPUS spectrum binary file — read_opus_bin_univ • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Read a Bruker OPUS spectrum binary file — read_opus_bin_univ"><meta property="og:description" content="Read single binary file acquired with an
Bruker Vertex FTIR Instrument"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ Bruker Vertex FTIR Instrument" />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Read a Bruker OPUS spectrum binary file</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/read-opus-universal.R'><code>R/read-opus-universal.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/read-opus-universal.R" class="external-link"><code>R/read-opus-universal.R</code></a></small>
<div class="hidden name"><code>read_opus_bin_univ.Rd</code></div>
</div>
@ -122,66 +54,61 @@ Bruker Vertex FTIR Instrument" />
Bruker Vertex FTIR Instrument</p>
</div>
<pre class="usage"><span class='fu'>read_opus_bin_univ</span>(<span class='no'>file_path</span>, <span class='kw'>extract</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"spc"</span>),
<span class='kw'>print_progress</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>atm_comp_minus4offset</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>file_path</th>
<td><p>Character vector with path to file</p></td>
</tr>
<tr>
<th>extract</th>
<td><p>Character vector of spectra types to extract from OPUS binary
file. Default is <code><a href='https://rdrr.io/r/base/c.html'>c("spc")</a></code>, which will extract the final spectra, e.g.
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">read_opus_bin_univ</span><span class="op">(</span><span class="va">file_path</span>, extract <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"spc"</span><span class="op">)</span>,</span>
<span>print_progress <span class="op">=</span> <span class="cn">TRUE</span>, atm_comp_minus4offset <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>file_path</dt>
<dd><p>Character vector with path to file</p></dd>
<dt>extract</dt>
<dd><p>Character vector of spectra types to extract from OPUS binary
file. Default is <code>c("spc")</code>, which will extract the final spectra, e.g.
expressed in absorbance (named <code>AB</code> in Bruker OPUS programs). Possible
additional values for the character vector supplied to extract are
<code>"ScSm"</code> (single channel spectrum of the sample measurement), \
code"ScRf" (single channel spectrum of the reference measurment),
<code>"IgSm"</code> (interferogram of the sample measurment) and <code>"IgRf"</code>
(interferogram of the reference measurement).</p></td>
</tr>
<tr>
<th>print_progress</th>
<td><p>Logical (default <code>TRUE</code>) whether a message is
printed when an OPUS binary file is parsed into an R list entry.</p></td>
</tr>
<tr>
<th>atm_comp_minus4offset</th>
<td><p>Logical whether spectra after atmospheric
(interferogram of the reference measurement).</p></dd>
<dt>print_progress</dt>
<dd><p>Logical (default <code>TRUE</code>) whether a message is
printed when an OPUS binary file is parsed into an R list entry.</p></dd>
<dt>atm_comp_minus4offset</dt>
<dd><p>Logical whether spectra after atmospheric
compensation are read with an offset of <code>-4</code> bites from Bruker OPUS
files. Default is <code>FALSE</code>.</p></td>
</tr>
</table>
files. Default is <code>FALSE</code>.</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

172
dev/reference/read_opus_univ.html

@ -1,69 +1,14 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read a list of Bruker OPUS spectrum binary files. — read_opus_univ • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Read a list of Bruker OPUS spectrum binary files. — read_opus_univ" />
<meta property="og:description" content="Read multiple spectral files measured with a Bruker FTIR Instrument. Files
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Read a list of Bruker OPUS spectrum binary files. — read_opus_univ • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Read a list of Bruker OPUS spectrum binary files. — read_opus_univ"><meta property="og:description" content="Read multiple spectral files measured with a Bruker FTIR Instrument. Files
containing spectra are in OPUS binary format.
read_opus_univ is a wrapper for read_opus_bin_univ())" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
read_opus_univ is a wrapper for read_opus_bin_univ())"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -79,117 +24,102 @@ read_opus_univ is a wrapper for read_opus_bin_univ())" />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Read a list of Bruker OPUS spectrum binary files.</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/read-opus-universal.R'><code>R/read-opus-universal.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/read-opus-universal.R" class="external-link"><code>R/read-opus-universal.R</code></a></small>
<div class="hidden name"><code>read_opus_univ.Rd</code></div>
</div>
<div class="ref-description">
<p>Read multiple spectral files measured with a Bruker FTIR Instrument. Files
containing spectra are in OPUS binary format.
<code>read_opus_univ</code> is a wrapper for <code><a href='read_opus_bin_univ.html'>read_opus_bin_univ()</a></code>)</p>
<code>read_opus_univ</code> is a wrapper for <code><a href="read_opus_bin_univ.html">read_opus_bin_univ()</a></code>)</p>
</div>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">read_opus_univ</span><span class="op">(</span><span class="va">fnames</span>, extract <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"spc"</span><span class="op">)</span>, parallel <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span>atm_comp_minus4offset <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
</div>
<pre class="usage"><span class='fu'>read_opus_univ</span>(<span class='no'>fnames</span>, <span class='kw'>extract</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"spc"</span>), <span class='kw'>parallel</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>atm_comp_minus4offset</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>fnames</th>
<td><p>List of character vectors containing full path names of spectra</p></td>
</tr>
<tr>
<th>extract</th>
<td><p>Character vector of spectra types to extract from file.
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>fnames</dt>
<dd><p>List of character vectors containing full path names of spectra</p></dd>
<dt>extract</dt>
<dd><p>Character vector of spectra types to extract from file.
Possible values are: "spc" (AB block in Bruker Opus software), "spc_nocomp"
(Spectra before final atmospheric compensation; only present if background
correction has been set in Opus), "ScSm" (Single channel spectrum of the
sample), "ScRf" (Single channel spectrum of the sample), "IgSm" (Interferogram
of the sample), "IgRf" (Interferogram of the reference). Default is
<code>extract = c("spc")</code>.</p></td>
</tr>
<tr>
<th>parallel</th>
<td><p>Logical (<code>TRUE</code> or <code>FALSE</code> indicating whether
<code>extract = c("spc")</code>.</p></dd>
<dt>parallel</dt>
<dd><p>Logical (<code>TRUE</code> or <code>FALSE</code> indicating whether
files are read in parallel (multiple processors or multiple cores)).
Default is <code>parallel = FALSE</code>. If <code>TRUE</code> a parallel backend needs
to be registered, e.g. by using the <code>doParallel</code> package.</p></td>
</tr>
<tr>
<th>atm_comp_minus4offset</th>
<td><p>Logical whether spectra after atmospheric
to be registered, e.g. by using the <code>doParallel</code> package.</p></dd>
<dt>atm_comp_minus4offset</dt>
<dd><p>Logical whether spectra after atmospheric
compensation are read with an offset of <code>-4</code> bites from Bruker OPUS
files. Default is <code>FALSE</code>.</p></td>
</tr>
</table>
files. Default is <code>FALSE</code>.</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>out List spectra and metadata (parameters) extracted from
<p>out List spectra and metadata (parameters) extracted from
Bruker OPUS spectrometer files. List names are the names of the OPUS
files whose spectral data were extracted.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

182
dev/reference/remove_outliers.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Remove outlier spectra — remove_outliers • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Remove outlier spectra — remove_outliers" />
<meta property="og:description" content="Remove outlier spectra based on the
pcout() function of the mvoutlier package." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Remove outlier spectra — remove_outliers • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Remove outlier spectra — remove_outliers"><meta property="og:description" content="Remove outlier spectra based on the
pcout() function of the mvoutlier package."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ pcout() function of the mvoutlier package." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Remove outlier spectra</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/remove-outl-spectra.R'><code>R/remove-outl-spectra.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/remove-outl-spectra.R" class="external-link"><code>R/remove-outl-spectra.R</code></a></small>
<div class="hidden name"><code>remove_outliers.Rd</code></div>
</div>
@ -122,75 +54,71 @@ pcout() function of the mvoutlier package." />
<code>pcout()</code> function of the <code>mvoutlier</code> package.</p>
</div>
<pre class="usage"><span class='fu'>remove_outliers</span>(<span class='no'>list_spectra</span>, <span class='kw'>remove</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">remove_outliers</span><span class="op">(</span><span class="va">list_spectra</span>, remove <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>list_spectra</th>
<td><p>List that contains averaged
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>list_spectra</dt>
<dd><p>List that contains averaged
spectral information
in list element <code>MIR_mean</code> (data.frame) and metadata in
<code>data_meta</code> (data.frame).</p></td>
</tr>
<tr>
<th>remove</th>
<td><p>logical expression (<code>TRUE</code> or <code>FALSE</code>)
<code>data_meta</code> (data.frame).</p></dd>
<dt>remove</dt>
<dd><p>logical expression (<code>TRUE</code> or <code>FALSE</code>)
that specifies weather spectra shall be removed.
If <code>rm = FALSE</code>, there will be no outlier removal</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Returns list <code>spectra_out</code> that contains:</p><ul>
<li><p><code>MIR_mean</code>: Outlier removed MIR spectra as
data.frame object. If <code>remove = FALSE</code>,
the function will
return almost identical list identical to <code>list_spectra</code>,
except that the first <code>indices</code> column of the spectral
data frame <code>MIR_mean</code> is removed
(This is done for both options
<code>remove = TRUE</code> and <code>remove = FALSE</code>).</p></li>
If <code>rm = FALSE</code>, there will be no outlier removal</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Returns list <code>spectra_out</code> that contains:</p><ul><li><p><code>MIR_mean</code>: Outlier removed MIR spectra as
data.frame object. If <code>remove = FALSE</code>,
the function will
return almost identical list identical to <code>list_spectra</code>,
except that the first <code>indices</code> column of the spectral
data frame <code>MIR_mean</code> is removed
(This is done for both options
<code>remove = TRUE</code> and <code>remove = FALSE</code>).</p></li>
<li><p><code>data_meta</code>: metadata data.frame, identical
as in the <code>list_spectra</code> input list.</p></li>
as in the <code>list_spectra</code> input list.</p></li>
<li><p><code>plot_out</code>: (optional) ggplot2 graph
that shows all spectra (absorbance on x-axis and wavenumber
on y-axis) with outlier marked, if
<code>remove = TRUE</code>.</p></li>
</ul>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
that shows all spectra (absorbance on x-axis and wavenumber
on y-axis) with outlier marked, if
<code>remove = TRUE</code>.</p></li>
</ul></div>
<div id="details">
<h2>Details</h2>
<p>This is an optional function if one wants to remove
outliers.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

267
dev/reference/resample_spc.html

@ -1,74 +1,19 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resample spectra in list-column to new x-axis interval — resample_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Resample spectra in list-column to new x-axis interval — resample_spc" />
<meta property="og:description" content="Resamples (interpolates) different spectra types with
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Resample spectra in list-column to new x-axis interval — resample_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Resample spectra in list-column to new x-axis interval — resample_spc"><meta property="og:description" content="Resamples (interpolates) different spectra types with
corresponding x-axis values that are both stored in list-columns of a spectra
tibble. A spectra tibble hosts spectra, x-axis vectors, metadata, and
further linked data with standardized naming conventions. Data input for
resampling can for example be generated with simplerspec::gather_spc().
Resampling is a key harmonizing step to process and later model spectra
measured at different resolutions and spectral ranges (i.e., different
spectrometer devices and/or measurement settings)." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
spectrometer devices and/or measurement settings)."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -84,42 +29,29 @@ spectrometer devices and/or measurement settings)." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Resample spectra in list-column to new x-axis interval</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/resample-spc.R'><code>R/resample-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/resample-spc.R" class="external-link"><code>R/resample-spc.R</code></a></small>
<div class="hidden name"><code>resample_spc.Rd</code></div>
</div>
@ -128,119 +60,117 @@ spectrometer devices and/or measurement settings)." />
corresponding x-axis values that are both stored in list-columns of a spectra
tibble. A spectra tibble hosts spectra, x-axis vectors, metadata, and
further linked data with standardized naming conventions. Data input for
resampling can for example be generated with <code><a href='gather_spc.html'>simplerspec::gather_spc()</a></code>.
resampling can for example be generated with <code><a href="gather_spc.html">simplerspec::gather_spc()</a></code>.
Resampling is a key harmonizing step to process and later model spectra
measured at different resolutions and spectral ranges (i.e., different
spectrometer devices and/or measurement settings).</p>
</div>
<pre class="usage"><span class='fu'>resample_spc</span>(
<span class='no'>spc_tbl</span>,
<span class='kw'>column_in</span> <span class='kw'>=</span> <span class='st'>"spc"</span>,
<span class='kw'>x_unit</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"wavenumber"</span>, <span class='st'>"wavelength"</span>),
<span class='kw'>wn_lower</span> <span class='kw'>=</span> <span class='fl'>500</span>,
<span class='kw'>wn_upper</span> <span class='kw'>=</span> <span class='fl'>4000</span>,
<span class='kw'>wn_interval</span> <span class='kw'>=</span> <span class='fl'>2</span>,
<span class='kw'>wl_lower</span> <span class='kw'>=</span> <span class='fl'>350</span>,
<span class='kw'>wl_upper</span> <span class='kw'>=</span> <span class='fl'>2500</span>,
<span class='kw'>wl_interval</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>interpol_method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"linear"</span>, <span class='st'>"spline"</span>)
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Spectra data embedded in a tibble object (classes
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">resample_spc</span><span class="op">(</span></span>
<span> <span class="va">spc_tbl</span>,</span>
<span> column_in <span class="op">=</span> <span class="st">"spc"</span>,</span>
<span> x_unit <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"wavenumber"</span>, <span class="st">"wavelength"</span><span class="op">)</span>,</span>
<span> wn_lower <span class="op">=</span> <span class="fl">500</span>,</span>
<span> wn_upper <span class="op">=</span> <span class="fl">4000</span>,</span>
<span> wn_interval <span class="op">=</span> <span class="fl">2</span>,</span>
<span> wl_lower <span class="op">=</span> <span class="fl">350</span>,</span>
<span> wl_upper <span class="op">=</span> <span class="fl">2500</span>,</span>
<span> wl_interval <span class="op">=</span> <span class="fl">1</span>,</span>
<span> interpol_method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"linear"</span>, <span class="st">"spline"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Spectra data embedded in a tibble object (classes
<code>"tbl_df", "tbl", "data.frame"</code>). The spectra tibble needs to contain at
least of one of the the spectra columns <code>spc</code>, <code>spc_rs</code>, <code>spc_mean</code>,
<code>spc_nocomp</code>, <code>sc_sm</code>, <code>sc_rf</code>, or <code>spc_pre</code> (list-columns with spectral
<code>data.table</code>s), and <code>wavenumbers</code> or <code>wavelengths</code> (list-column with vectors
of x-axis values corresponding to each spectrum). The help section <em>"Matching
spectrum type and corresponding x-axis type"</em> describes the spectra types
and corresponding x-axis types.</p></td>
</tr>
<tr>
<th>column_in</th>
<td><p>Character vector of length 1L or symbol/name
specifying the name of list-column that contains the spectra to be resampled.</p></td>
</tr>
<tr>
<th>x_unit</th>
<td><p>Character vector of length 1L specifying the measurement unit
and corresponding x-axis types.</p></dd>
<dt>column_in</dt>
<dd><p>Character vector of length 1L or symbol/name
specifying the name of list-column that contains the spectra to be resampled.</p></dd>
<dt>x_unit</dt>
<dd><p>Character vector of length 1L specifying the measurement unit
of the x-axis values (list-column) of the input spectra in <code>spc_tbl</code>.
Possible values are <code>"wavenumber"</code> (default) or <code>"wavelength"</code>. Wavenumber
is a convenient unit of frequency in the mid-infrared spectral range,
where wavelength is often used as spatial period for the visible and
near-infrared range.</p></td>
</tr>
<tr>
<th>wn_lower</th>
<td><p>Numeric value of lowest wavenumber. This argument will only
near-infrared range.</p></dd>
<dt>wn_lower</dt>
<dd><p>Numeric value of lowest wavenumber. This argument will only
be used if <code>x_unit = "wavenumber"</code>. The value serves as starting value for
the new wavenumber sequence that the spectra will be resampled upon. Default
value is 500 (i.e., in reciprocal centimeters).</p></td>
</tr>
<tr>
<th>wn_upper</th>
<td><p>Numeric value of highest wavenumber. This argument will only
value is 500 (i.e., in reciprocal centimeters).</p></dd>
<dt>wn_upper</dt>
<dd><p>Numeric value of highest wavenumber. This argument will only
be used if <code>x_unit = "wavenumber</code>. The value will be used as last value of
the new wavenumber sequence that the spectra will be resampled upon. Default
value is 4000 (i.e., in reciprocal centimeters).</p></td>
</tr>
<tr>
<th>wn_interval</th>
<td><p>Numeric value of the wavenumber increment for the new
value is 4000 (i.e., in reciprocal centimeters).</p></dd>
<dt>wn_interval</dt>
<dd><p>Numeric value of the wavenumber increment for the new
wavenumber sequence that the spectra will be resampled upon. Default value
is 2 (i.e., in reciprocal centimeters).</p></td>
</tr>
<tr>
<th>wl_lower</th>
<td><p>Numeric value of lowest wavelength. This argument will only
is 2 (i.e., in reciprocal centimeters).</p></dd>
<dt>wl_lower</dt>
<dd><p>Numeric value of lowest wavelength. This argument will only
be used if <code>x_unit = "wavelength"</code>. The value serves as starting value of
the new wavenumber sequence that the spectra will be resampled upon.
Default value is 350 (i.e. in nanometers).</p></td>
</tr>
<tr>
<th>wl_upper</th>
<td><p>Numeric value of highest wavelength. This argument will only
Default value is 350 (i.e. in nanometers).</p></dd>
<dt>wl_upper</dt>
<dd><p>Numeric value of highest wavelength. This argument will only
be used if <code>x_unit = "wavelength"</code>. The value will be used as last value of
the new wavenumber sequence that the spectra will be resampled upon. Default
value is 2500 (i.e., in nanometers).</p></td>
</tr>
<tr>
<th>wl_interval</th>
<td><p>Numeric value of the wavelength increment for the new
value is 2500 (i.e., in nanometers).</p></dd>
<dt>wl_interval</dt>
<dd><p>Numeric value of the wavelength increment for the new
wavenumber sequence that the spectra will be resampled upon. This argument
will only be used if <code>x_unit = "wavelength"</code>. Default value is 1 (i.e., in
nanometers).</p></td>
</tr>
<tr>
<th>interpol_method</th>
<td><p>Character of <code>"linear"</code> (default) or <code>"spline"</code> with
nanometers).</p></dd>
<dt>interpol_method</dt>
<dd><p>Character of <code>"linear"</code> (default) or <code>"spline"</code> with
the interpolation method. <code>"spline"</code> uses a cubic spline to interpolate the
input spectra at given x-axis values to new equispaced x-axis intervals.</p></td>
</tr>
</table>
input spectra at given x-axis values to new equispaced x-axis intervals.</p></dd>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A spectra tibble (<code>spc_tbl</code>) containing two added list-columns:</p><ul>
<li><p><code>spc_rs:</code> Resampled spectra as list of <code>data.table</code>s</p></li>
<p>A spectra tibble (<code>spc_tbl</code>) containing two added list-columns:</p><ul><li><p><code>spc_rs:</code> Resampled spectra as list of <code>data.table</code>s</p></li>
<li><p><code>wavenumbers_rs</code> or <code>wavelengths_rs</code>: Resampled x-axis values as list of
numeric vectors</p></li>
</ul>
<h2 class="hasAnchor" id="matching-spectrum-type-and-corresponding-x-axis-type"><a class="anchor" href="#matching-spectrum-type-and-corresponding-x-axis-type"></a>Matching spectrum type and corresponding x-axis type</h2>
</ul></div>
<div id="matching-spectrum-type-and-corresponding-x-axis-type">
<h2>Matching spectrum type and corresponding x-axis type</h2>
<p>The combinations of input spectrum types (<code>column_in</code>) and
corresponding x-axis types are generated from a simple lookup list. The
following key-value(s) pairs can be matched at given key, which is the column
name from <code>column_in</code> containing the spectra.</p><ul>
<li><p><code>"spc"</code> : <code>"wavenumbers"</code> or <code>"wavelengths"</code> (raw spectra)</p></li>
name from <code>column_in</code> containing the spectra.</p><ul><li><p><code>"spc"</code> : <code>"wavenumbers"</code> or <code>"wavelengths"</code> (raw spectra)</p></li>
<li><p><code>"spc_rs"</code> : <code>"wavenumbers_rs"</code> or <code>"wavelengths_rs"</code>) (resampled spectra)</p></li>
<li><p><code>"spc_mean"</code> : <code>"wavenumbers_rs"</code> or <code>"wavelengths_rs"</code> (mean spectra)</p></li>
<li><p><code>"spc_nocomp"</code> <code>"wavenumbers"</code> or <code>"wavelengths"</code> (spectra prior
@ -250,34 +180,29 @@ sample spectra)</p></li>
<li><p><code>"sc_rf" : c("wavenumbers_sc_rf", "wavelengths_sc_rf")</code> (single channel
reference spectra)</p></li>
<li><p><code>"spc_pre" : "xvalues_pre"</code> (preprocessed spectra)</p></li>
</ul>
</ul></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

163
dev/reference/select_ref_spc.html

@ -1,70 +1,15 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Select a set of reference spectra to be measured by reference analysis
methods — select_ref_spc • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Select a set of reference spectra to be measured by reference analysis
methods — select_ref_spc" />
<meta property="og:description" content="Select a set of calibration spectra to develop spectral models.
Samples in this list will be analyzed using laboratory reference methods." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Select a set of reference spectra to be measured by reference analysis
methods — select_ref_spc • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Select a set of reference spectra to be measured by reference analysis
methods — select_ref_spc"><meta property="og:description" content="Select a set of calibration spectra to develop spectral models.
Samples in this list will be analyzed using laboratory reference methods."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -80,43 +25,30 @@ Samples in this list will be analyzed using laboratory reference methods." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Select a set of reference spectra to be measured by reference analysis
methods</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/select-ref-spectra.R'><code>R/select-ref-spectra.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/select-ref-spectra.R" class="external-link"><code>R/select-ref-spectra.R</code></a></small>
<div class="hidden name"><code>select_ref_spc.Rd</code></div>
</div>
@ -125,59 +57,54 @@ methods</h1>
Samples in this list will be analyzed using laboratory reference methods.</p>
</div>
<pre class="usage"><span class='fu'>select_ref_spc</span>(<span class='no'>spc_tbl</span>, <span class='no'>ratio_ref</span>, <span class='no'>pc</span>, <span class='kw'>print</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Spectra as tibble objects that contain preprocessed spectra</p></td>
</tr>
<tr>
<th>ratio_ref</th>
<td><p>Ratio of desired reference samples to total sample number</p></td>
</tr>
<tr>
<th>pc</th>
<td><p>Number of principal components (numeric). If pc &lt; 1, the number
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">select_ref_spc</span><span class="op">(</span><span class="va">spc_tbl</span>, <span class="va">ratio_ref</span>, <span class="va">pc</span>, print <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Spectra as tibble objects that contain preprocessed spectra</p></dd>
<dt>ratio_ref</dt>
<dd><p>Ratio of desired reference samples to total sample number</p></dd>
<dt>pc</dt>
<dd><p>Number of principal components (numeric). If pc &lt; 1, the number
of principal components kept corresponds to the number of components
explaining at least (pc * 100) percent of the total variance.</p></td>
</tr>
<tr>
<th>print</th>
<td><p>logical expression whether a plot (ggplot2) of sample selection
explaining at least (pc * 100) percent of the total variance.</p></dd>
<dt>print</dt>
<dd><p>logical expression whether a plot (ggplot2) of sample selection
for reference analysis is shown in PCA space
(<code>TRUE</code> or <code>FALSE</code>).</p></td>
</tr>
</table>
(<code>TRUE</code> or <code>FALSE</code>).</p></dd>
</dl></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

180
dev/reference/select_spc_vars.html

@ -1,70 +1,15 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Select every n-th spectral variable for all spectra and x-values in spectral
tibble (<code>spc_tbl</code>) — select_spc_vars • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Select every n-th spectral variable for all spectra and x-values in spectral
tibble (<code>spc_tbl</code>) — select_spc_vars" />
<meta property="og:description" content="Select every n-th spectral variable for all spectra and x-values in spectral
tibble (spc_tbl)" />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Select every n-th spectral variable for all spectra and x-values in spectral
tibble (spc_tbl) — select_spc_vars • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Select every n-th spectral variable for all spectra and x-values in spectral
tibble (spc_tbl) — select_spc_vars"><meta property="og:description" content="Select every n-th spectral variable for all spectra and x-values in spectral
tibble (spc_tbl)"><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -80,43 +25,30 @@ tibble (spc_tbl)" />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Select every n-th spectral variable for all spectra and x-values in spectral
tibble (<code>spc_tbl</code>)</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/select-spc.R'><code>R/select-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/select-spc.R" class="external-link"><code>R/select-spc.R</code></a></small>
<div class="hidden name"><code>select_spc_vars.Rd</code></div>
</div>
@ -125,67 +57,63 @@ tibble (<code>spc_tbl</code>)</h1>
tibble (<code>spc_tbl</code>)</p>
</div>
<pre class="usage"><span class='fu'>select_spc_vars</span>(
<span class='no'>spc_tbl</span>,
<span class='kw'>lcol_spc</span> <span class='kw'>=</span> <span class='st'>"spc_pre"</span>,
<span class='kw'>lcol_xvalues</span> <span class='kw'>=</span> <span class='st'>"xvalues_pre"</span>,
<span class='kw'>every</span> <span class='kw'>=</span> <span class='kw'>NULL</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Tibble data.frame containing spectra in list-column</p></td>
</tr>
<tr>
<th>lcol_spc</th>
<td><p>List-column containing spectra, specified with column
name as symbols or 1L character vector.</p></td>
</tr>
<tr>
<th>lcol_xvalues</th>
<td><p>List-column containing x-values, specified with
column name as symbols or 1L character vector.</p></td>
</tr>
<tr>
<th>every</th>
<td><p>Every n-th spectral positions to keep as 1L integer vector.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">select_spc_vars</span><span class="op">(</span></span>
<span> <span class="va">spc_tbl</span>,</span>
<span> lcol_spc <span class="op">=</span> <span class="st">"spc_pre"</span>,</span>
<span> lcol_xvalues <span class="op">=</span> <span class="st">"xvalues_pre"</span>,</span>
<span> every <span class="op">=</span> <span class="cn">NULL</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Tibble data.frame containing spectra in list-column</p></dd>
<dt>lcol_spc</dt>
<dd><p>List-column containing spectra, specified with column
name as symbols or 1L character vector.</p></dd>
<dt>lcol_xvalues</dt>
<dd><p>List-column containing x-values, specified with
column name as symbols or 1L character vector.</p></dd>
<dt>every</dt>
<dd><p>Every n-th spectral positions to keep as 1L integer vector.</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>a spectral tibble</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

184
dev/reference/slice_xvalues.html

@ -1,69 +1,14 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Slice spectra into defined x-axis ranges — slice_xvalues • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Slice spectra into defined x-axis ranges — slice_xvalues" />
<meta property="og:description" content="Slice spectra contained in list-column of spectral tibble
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Slice spectra into defined x-axis ranges — slice_xvalues • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Slice spectra into defined x-axis ranges — slice_xvalues"><meta property="og:description" content="Slice spectra contained in list-column of spectral tibble
(data frame). A list of x-axis value ranges can be specified. Spectra are
cut based on these ranges." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
cut based on these ranges."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -79,42 +24,29 @@ cut based on these ranges." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Slice spectra into defined x-axis ranges</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/slice-spc.R'><code>R/slice-spc.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/slice-spc.R" class="external-link"><code>R/slice-spc.R</code></a></small>
<div class="hidden name"><code>slice_xvalues.Rd</code></div>
</div>
@ -124,69 +56,73 @@ cut based on these ranges." />
cut based on these ranges.</p>
</div>
<pre class="usage"><span class='fu'>slice_xvalues</span>(<span class='no'>spc_tbl</span>, <span class='kw'>xunit_lcol</span> <span class='kw'>=</span> <span class='st'>"wavenumbers"</span>, <span class='kw'>spc_lcol</span> <span class='kw'>=</span> <span class='st'>"spc"</span>,
<span class='kw'>xvalues_cut</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">slice_xvalues</span><span class="op">(</span></span>
<span> <span class="va">spc_tbl</span>,</span>
<span> xunit_lcol <span class="op">=</span> <span class="st">"wavenumbers"</span>,</span>
<span> spc_lcol <span class="op">=</span> <span class="st">"spc"</span>,</span>
<span> xvalues_cut <span class="op">=</span> <span class="cn">NULL</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>spc_tbl</th>
<td><p>Spectral data in a tibble object (classes "tibble_df", "tbl"
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>spc_tbl</dt>
<dd><p>Spectral data in a tibble object (classes "tibble_df", "tbl"
and "data.frame"). The spectra tibble is expected to contain at least
the column <code>spc</code> (list-column with spectral matrices stored in a list)
and <code>wavenumbers</code> or <code>wavelengths</code> (list-column that contains list
of x-axis values).</p></td>
</tr>
<tr>
<th>xunit_lcol</th>
<td><p>Character vector that specifies column name where x-axis
axis units are stored within <code>spc_tbl</code>. Default is <code>"wavenumber"</code>.</p></td>
</tr>
<tr>
<th>spc_lcol</th>
<td><p>Character vector that specifies which column (list-column)
contains spectra to be sliced. Default is <code>"spc"</code>.</p></td>
</tr>
<tr>
<th>xvalues_cut</th>
<td><p>List of numeric vectors that contains upper and lower bounds of respective regions to keep in spectra. The spectral regions outside
the <code>xvalues_cut</code> intervals will be cut out in the output spectra.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Spectral tibble (data frame with list-columns) with sliced x-axis
of x-axis values).</p></dd>
<dt>xunit_lcol</dt>
<dd><p>Character vector that specifies column name where x-axis
axis units are stored within <code>spc_tbl</code>. Default is <code>"wavenumber"</code>.</p></dd>
<dt>spc_lcol</dt>
<dd><p>Character vector that specifies which column (list-column)
contains spectra to be sliced. Default is <code>"spc"</code>.</p></dd>
<dt>xvalues_cut</dt>
<dd><p>List of numeric vectors that contains upper and lower bounds of respective regions to keep in spectra. The spectral regions outside
the <code>xvalues_cut</code> intervals will be cut out in the output spectra.</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>Spectral tibble (data frame with list-columns) with sliced x-axis
column and spectral column. Both the x-axis list-column and the spectral
tibble list-column only contain data specified within the <code>xvalues_cut</code>
argument (list of numeric vectors).</p>
tibble list-column only contain data specified within the <code>xvalues_cut</code></p>
<p>argument (list of numeric vectors).</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

152
dev/reference/split_df2l.html

@ -1,68 +1,13 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Split a tibble data frame into a list of tibbles by a group column — split_df2l • simplerspec</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Split a tibble data frame into a list of tibbles by a group column — split_df2l" />
<meta property="og:description" content="Helper function that calls split on a tibble using a
grouping column within tibble." />
<meta name="robots" content="noindex">
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Split a tibble data frame into a list of tibbles by a group column — split_df2l • simplerspec</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Split a tibble data frame into a list of tibbles by a group column — split_df2l"><meta property="og:description" content="Helper function that calls split on a tibble using a
grouping column within tibble."><meta name="robots" content="noindex"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]--></head><body data-spy="scroll" data-target="#toc">
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
@ -78,42 +23,29 @@ grouping column within tibble." />
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<ul class="nav navbar-nav"><li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/philipp-baumann/simplerspec/">
<span class="fab fa fab fa-github fa-lg"></span>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/philipp-baumann/simplerspec/" class="external-link">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Split a tibble data frame into a list of tibbles by a group column</h1>
<small class="dont-index">Source: <a href='https://github.com/philipp-baumann/simplerspec/blob/master/R/tbl-lcol-map-funprog.R'><code>R/tbl-lcol-map-funprog.R</code></a></small>
<small class="dont-index">Source: <a href="https://github.com/philipp-baumann/simplerspec/blob/HEAD/R/tbl-lcol-map-funprog.R" class="external-link"><code>R/tbl-lcol-map-funprog.R</code></a></small>
<div class="hidden name"><code>split_df2l.Rd</code></div>
</div>
@ -122,52 +54,50 @@ grouping column within tibble." />
grouping column within tibble.</p>
</div>
<pre class="usage"><span class='fu'>split_df2l</span>(<span class='no'>tbl_df</span>, <span class='no'>group</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>tbl_df</th>
<td><p>Tibble data frame</p></td>
</tr>
<tr>
<th>group</th>
<td><p>Character vector with name of column based on which tibble
is split into a list of tibbles</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>List of tibbles. Each tibble contains data split by
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">split_df2l</span><span class="op">(</span><span class="va">tbl_df</span>, <span class="va">group</span><span class="op">)</span></span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>tbl_df</dt>
<dd><p>Tibble data frame</p></dd>
<dt>group</dt>
<dd><p>Character vector with name of column based on which tibble
is split into a list of tibbles</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>List of tibbles. Each tibble contains data split by
a group column within <code>tbl_df</code>.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer>
<div class="copyright">
<p>Developed by Philipp Baumann.</p>
<footer><div class="copyright">
<p></p><p>Developed by Philipp Baumann.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</footer></div>
</body>
</html>
</body></html>

12
dev/sitemap.xml

@ -1,9 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://philipp-baumann.github.io/simplerspec/LICENSE.html</loc>
</url>
<url>
<loc>https://philipp-baumann.github.io/simplerspec/authors.html</loc>
</url>
<url>
<loc>https://philipp-baumann.github.io/simplerspec/index.html</loc>
</url>
<url>
<loc>https://philipp-baumann.github.io/simplerspec/news/index.html</loc>
</url>
<url>
<loc>https://philipp-baumann.github.io/simplerspec/reference/assess_multimodels.html</loc>
</url>
<url>
@ -34,6 +43,9 @@
<loc>https://philipp-baumann.github.io/simplerspec/reference/gather_spc.html</loc>
</url>
<url>
<loc>https://philipp-baumann.github.io/simplerspec/reference/index.html</loc>
</url>
<url>
<loc>https://philipp-baumann.github.io/simplerspec/reference/join_chem_spec.html</loc>
</url>
<url>

Loading…
Cancel
Save