Deploying to gh-pages from @ tmelliott/ts@1907e35fdf 🚀
This commit is contained in:
parent
6d069e95c5
commit
1392f7ff7a
@ -88,14 +88,14 @@ we can preview the results by calling the functions:</p>
|
|||||||
<span><span class="co">#> h <- hist(faithful$waiting, breaks = bins, plot = FALSE)</span></span>
|
<span><span class="co">#> h <- hist(faithful$waiting, breaks = bins, plot = FALSE)</span></span>
|
||||||
<span><span class="co">#> data.frame(x = h$mids, y = h$density)</span></span>
|
<span><span class="co">#> data.frame(x = h$mids, y = h$density)</span></span>
|
||||||
<span><span class="co">#> },</span></span>
|
<span><span class="co">#> },</span></span>
|
||||||
<span><span class="co">#> result = ts_dataframe(eruptions = ts_numeric(), waiting = ts_numeric())</span></span>
|
<span><span class="co">#> result = ts_dataframe(x = ts_numeric(0), y = ts_numeric(0))</span></span>
|
||||||
<span><span class="co">#> )</span></span>
|
<span><span class="co">#> )</span></span>
|
||||||
<span><span class="co">#> get_smoother <- ts_function(</span></span>
|
<span><span class="co">#> get_smoother <- ts_function(</span></span>
|
||||||
<span><span class="co">#> function(bandwidth = ts_numeric(1)) {</span></span>
|
<span><span class="co">#> function(bandwidth = ts_numeric(1)) {</span></span>
|
||||||
<span><span class="co">#> d <- density(faithful$waiting, bw = bandwidth)</span></span>
|
<span><span class="co">#> d <- density(faithful$waiting, bw = bandwidth)</span></span>
|
||||||
<span><span class="co">#> data.frame(x = d$x, y = d$y)</span></span>
|
<span><span class="co">#> data.frame(x = d$x, y = d$y)</span></span>
|
||||||
<span><span class="co">#> },</span></span>
|
<span><span class="co">#> },</span></span>
|
||||||
<span><span class="co">#> result = ts_dataframe(x = ts_numeric(), y = ts_numeric())</span></span>
|
<span><span class="co">#> result = ts_dataframe(x = ts_numeric(0), y = ts_numeric(0))</span></span>
|
||||||
<span><span class="co">#> )</span></span>
|
<span><span class="co">#> )</span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span><span class="kw"><a href="https://rdrr.io/r/base/source.html" class="external-link">source</a></span><span class="op">(</span><span class="st">'faithful-app.R'</span><span class="op">)</span></span>
|
<span><span class="kw"><a href="https://rdrr.io/r/base/source.html" class="external-link">source</a></span><span class="op">(</span><span class="st">'faithful-app.R'</span><span class="op">)</span></span>
|
||||||
@ -114,9 +114,8 @@ we can preview the results by calling the functions:</p>
|
|||||||
<span><span class="co">#> 10 87.5 0.0169117647</span></span>
|
<span><span class="co">#> 10 87.5 0.0169117647</span></span>
|
||||||
<span><span class="co">#> 11 92.5 0.0036764706</span></span>
|
<span><span class="co">#> 11 92.5 0.0036764706</span></span>
|
||||||
<span><span class="co">#> 12 97.5 0.0007352941</span></span></code></pre></div>
|
<span><span class="co">#> 12 97.5 0.0007352941</span></span></code></pre></div>
|
||||||
<p>That’s it! We’ll use <code><a href="../reference/ts_deploy.html">ts_deploy()</a></code> later to create the
|
<p>That’s it! We’ll use <code><a href="../reference/ts_compile.html">ts_compile()</a></code> later to create the
|
||||||
server code and Typescript schema for the app.</p>
|
server code and Typescript schema for the app.</p>
|
||||||
<p>TODO: call ts_compile() from ts_deploy()?</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="create-the-react-app">Create the React app<a class="anchor" aria-label="anchor" href="#create-the-react-app"></a>
|
<h2 id="create-the-react-app">Create the React app<a class="anchor" aria-label="anchor" href="#create-the-react-app"></a>
|
||||||
@ -134,7 +133,7 @@ packages:</p>
|
|||||||
<div class="section level3">
|
<div class="section level3">
|
||||||
<h3 id="create-the-server-code">Create the server code<a class="anchor" aria-label="anchor" href="#create-the-server-code"></a>
|
<h3 id="create-the-server-code">Create the server code<a class="anchor" aria-label="anchor" href="#create-the-server-code"></a>
|
||||||
</h3>
|
</h3>
|
||||||
<p>We now use the <code><a href="../reference/ts_deploy.html">ts_deploy()</a></code> function to create two
|
<p>We now use the <code><a href="../reference/ts_compile.html">ts_compile()</a></code> function to create two
|
||||||
files:</p>
|
files:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -148,8 +147,7 @@ functions directly in the app like any other typescript function!</li>
|
|||||||
<p>We’ll send these straight to the <code>faithful-demo/src</code>
|
<p>We’ll send these straight to the <code>faithful-demo/src</code>
|
||||||
directory.</p>
|
directory.</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||||
<code class="sourceCode R"><span><span class="fu"><a href="../reference/ts_compile.html">ts_compile</a></span><span class="op">(</span><span class="st">'faithful-app.R'</span>, file <span class="op">=</span> <span class="st">'faithful-demo/src/faithful-app.rserve.ts'</span><span class="op">)</span></span>
|
<code class="sourceCode R"><span><span class="fu"><a href="../reference/ts_compile.html">ts_compile</a></span><span class="op">(</span><span class="st">'faithful-app.R'</span>, filename <span class="op">=</span> <span class="st">'faithful-demo/src/faithful-app.rserve'</span><span class="op">)</span></span></code></pre></div>
|
||||||
<span><span class="fu"><a href="../reference/ts_deploy.html">ts_deploy</a></span><span class="op">(</span><span class="st">'faithful-app.R'</span>, file <span class="op">=</span> <span class="st">'faithful-demo/src/faithful-app.rserve.R'</span><span class="op">)</span></span></code></pre></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section level3">
|
<div class="section level3">
|
||||||
<h3 id="write-the-app">Write the app<a class="anchor" aria-label="anchor" href="#write-the-app"></a>
|
<h3 id="write-the-app">Write the app<a class="anchor" aria-label="anchor" href="#write-the-app"></a>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ pkgdown: 2.1.1
|
|||||||
pkgdown_sha: ~
|
pkgdown_sha: ~
|
||||||
articles:
|
articles:
|
||||||
simple-react-app: simple-react-app.html
|
simple-react-app: simple-react-app.html
|
||||||
last_built: 2025-01-28T20:31Z
|
last_built: 2025-01-28T23:03Z
|
||||||
urls:
|
urls:
|
||||||
reference: http://tomelliott.co.nz/ts/reference
|
reference: http://tomelliott.co.nz/ts/reference
|
||||||
article: http://tomelliott.co.nz/ts/articles
|
article: http://tomelliott.co.nz/ts/articles
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user