diff options
Diffstat (limited to 'docs/reference/ilr.html')
-rw-r--r-- | docs/reference/ilr.html | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index b75a9a91..760dd3aa 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -158,14 +158,15 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='co'># Order matters</span> -<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#> <span class='error'>Error in ilr(c(0.1, 1, 10)): konnte Funktion "ilr" nicht finden</span></div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#> <span class='error'>Error in ilr(c(10, 1, 0.1)): konnte Funktion "ilr" nicht finden</span></div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span> -<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#> <span class='error'>Error in ilr(c(3, 3, 3)): konnte Funktion "ilr" nicht finden</span></div><div class='input'><span class='co'># Almost equal entries give small numbers</span> -<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#> <span class='error'>Error in ilr(c(0.3, 0.4, 0.3)): konnte Funktion "ilr" nicht finden</span></div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span> -<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> <span class='error'>Error in invilr(ilr(c(0.7, 0.29, 0.01))): konnte Funktion "invilr" nicht finden</span></div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> <span class='error'>Error in invilr(ilr(2.1 * c(0.7, 0.29, 0.01))): konnte Funktion "invilr" nicht finden</span></div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span> -<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#> <span class='error'>Error in invilr(-10): konnte Funktion "invilr" nicht finden</span></div><div class='input'><span class='fu'>invilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#> <span class='error'>Error in invilr(c(-10, 0)): konnte Funktion "invilr" nicht finden</span></div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span> -<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='fu'>invilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#> <span class='error'>Error in invilr(c(-10, 0)): konnte Funktion "invilr" nicht finden</span></div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span> +<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#> [1] -1.628174 -2.820079</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#> [1] 1.628174 2.820079</div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span> +<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#> [1] 0 0</div><div class='input'><span class='co'># Almost equal entries give small numbers</span> +<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#> [1] -0.2034219 0.1174457</div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span> +<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> [1] 0.70 0.29 0.01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> [1] 0.70 0.29 0.01</div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span> +<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#> [1] 7.213536e-07 9.999993e-01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#> [1] 7.207415e-07 9.991507e-01 8.486044e-04</div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span> +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='fu'>invilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#> [1] 1</div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span> <span class='no'>a</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>) -<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'>invilr</span>(<span class='no'>a</span>)</div><div class='output co'>#> <span class='error'>Error in invilr(a): konnte Funktion "invilr" nicht finden</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/length'>length</a></span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#> <span class='error'>Error in eval(expr, envir, enclos): Objekt 'b' nicht gefunden</span></div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#> <span class='error'>Error in ilr(c(b[1:3], 1 - sum(b[1:3]))): konnte Funktion "ilr" nicht finden</span></div></pre> +<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'>invilr</span>(<span class='no'>a</span>) +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/length'>length</a></span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#> [1] 4</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#> [1] 0.1 0.3 0.5</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> |