galaaz 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +63 -58
- data/blogs/galaaz_ggplot/galaaz_ggplot.log +59 -68
- data/blogs/galaaz_ggplot/galaaz_ggplot.md +91 -84
- data/blogs/galaaz_ggplot/galaaz_ggplot.tex +125 -94
- data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png +0 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png +0 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/midwest_rb.png +0 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/scatter_plot_rb.png +0 -0
- data/blogs/gknit/gknit.Rmd +33 -28
- data/blogs/gknit/gknit.md +47 -42
- data/blogs/gknit/gknit.tex +1368 -0
- data/blogs/gknit/gknit_files/figure-html/bubble-1.png +0 -0
- data/blogs/gknit/gknit_files/figure-html/diverging_bar.png +0 -0
- data/blogs/gknit/gknit_files/figure-latex/bubble-1.png +0 -0
- data/blogs/gknit/gknit_files/gknit_files/figure-latex/bubble-1.png +0 -0
- data/blogs/manual/manual.Rmd +129 -60
- data/blogs/manual/manual.log +289 -545
- data/blogs/manual/manual.md +551 -467
- data/blogs/manual/manual.tex +1059 -485
- data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
- data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
- data/blogs/manual/manual_files/figure-markdown_github/bubble-1.png +0 -0
- data/blogs/manual/manual_files/figure-markdown_github/diverging_bar.png +0 -0
- data/blogs/manual/manual_files/manual_files/figure-latex/bubble-1.png +0 -0
- data/blogs/nse_dplyr/nse_dplyr.Rmd +28 -7
- data/blogs/nse_dplyr/nse_dplyr.log +49 -153
- data/blogs/nse_dplyr/nse_dplyr.md +676 -705
- data/blogs/nse_dplyr/nse_dplyr.tex +1589 -0
- data/blogs/oh_my/oh_my.Rmd +193 -55
- data/blogs/oh_my/oh_my.log +265 -95
- data/blogs/oh_my/oh_my.md +236 -95
- data/blogs/oh_my/oh_my.tex +1976 -68
- data/blogs/ruby_plot/ruby_plot.Rmd +42 -34
- data/blogs/ruby_plot/ruby_plot.log +101 -99
- data/blogs/ruby_plot/ruby_plot.md +52 -46
- data/blogs/ruby_plot/ruby_plot.tex +134 -102
- data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/dose_len.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/dose_len.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
- data/lib/galaaz/cli.rb +206 -11
- data/script/omarchy/README.md +94 -0
- data/script/omarchy/debug-galaaz.sh +91 -0
- data/script/omarchy/galaaz-add.sh +176 -0
- data/script/omarchy/galaaz-gknit.sh +73 -0
- data/script/omarchy/galaaz-guide.sh +123 -0
- data/script/omarchy/install-galaaz.sh +308 -0
- data/script/omarchy/omarchy-menu.jsonc +92 -0
- data/script/omarchy/remove-galaaz.sh +34 -0
- data/sty/galaaz.sty +22 -0
- data/version.rb +1 -1
- metadata +27 -1
|
@@ -165,6 +165,28 @@
|
|
|
165
165
|
% Command to import an R variable to latex
|
|
166
166
|
\newcommand{\RtoLatex}[2]{\newcommand{#1}{#2}}
|
|
167
167
|
|
|
168
|
+
% Soft-wrap Pandoc highlighted code/output boxes (Shaded + Highlighting).
|
|
169
|
+
% This runs after Pandoc's default \DefineVerbatimEnvironment{Highlighting}
|
|
170
|
+
% (header includes come later in the generated .tex). Prefer manual line
|
|
171
|
+
% breaks in Rmd sources; breaklines is a safety net for leftovers/output.
|
|
172
|
+
% Requires TinyTeX/TeX Live package: tlmgr install fvextra
|
|
173
|
+
\IfFileExists{fvextra.sty}{%
|
|
174
|
+
\usepackage{fvextra}%
|
|
175
|
+
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{%
|
|
176
|
+
breaklines=true,
|
|
177
|
+
breakanywhere=true,
|
|
178
|
+
breakindent=1.5em,
|
|
179
|
+
fontsize=\small,
|
|
180
|
+
commandchars=\\\{\}%
|
|
181
|
+
}%
|
|
182
|
+
}{%
|
|
183
|
+
% fancyvrb is already loaded by Pandoc; shrink code so more fits per line.
|
|
184
|
+
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{%
|
|
185
|
+
fontsize=\small,
|
|
186
|
+
commandchars=\\\{\}%
|
|
187
|
+
}%
|
|
188
|
+
}
|
|
189
|
+
|
|
168
190
|
%
|
|
169
191
|
%\newcommand{\atraso}[1]{\color{red} \textbf {Tempo desde a Assinatura do Contrato: #1 dias}}
|
|
170
192
|
\usepackage{bookmark}
|
|
@@ -194,41 +216,42 @@ It reached high popularity with the development of Ruby on Rails (RoR)
|
|
|
194
216
|
by David Heinemeier Hansson. RoR is a web application framework first
|
|
195
217
|
released around 2005. It makes extensive use of Ruby's metaprogramming
|
|
196
218
|
features. With RoR, Ruby became very popular. According to
|
|
197
|
-
\href{https://www.tiobe.com/tiobe-index/ruby/}{Ruby's
|
|
198
|
-
|
|
199
|
-
started picking up again.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
219
|
+
\href{https://www.tiobe.com/tiobe-index/ruby/}{Ruby's ranking in the
|
|
220
|
+
TIOBE index} it \textbf{peaked} in popularity around 2008, then declined
|
|
221
|
+
until 2015 when it started picking up again. As of the original
|
|
222
|
+
publication date (November 2018), TIOBE placed Ruby around 16th among
|
|
223
|
+
languages.
|
|
224
|
+
|
|
225
|
+
Python, often grouped with Ruby as a high-level scripting language,
|
|
226
|
+
ranked higher in that same snapshot. Ruby is often criticized for its
|
|
204
227
|
focus on web applications. But Ruby can do
|
|
205
228
|
\href{https://github.com/markets/awesome-ruby}{much more} than just web
|
|
206
|
-
applications. Yet, for scientific computing, Ruby lags
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
analysis.
|
|
229
|
+
applications. Yet, for scientific computing, Ruby lags behind Python and
|
|
230
|
+
R. Python combines web frameworks such as Django with NumPy, pandas,
|
|
231
|
+
SciPy, and \textbf{a very large ecosystem} of domain-specific packages.
|
|
232
|
+
R is a free software environment for statistical computing and graphics
|
|
233
|
+
with thousands of libraries for data analysis.
|
|
211
234
|
|
|
212
235
|
Until recently, there was no real perspective for Ruby to bridge this
|
|
213
236
|
gap. Implementing a complete scientific computing infrastructure would
|
|
214
237
|
take too long.
|
|
215
238
|
|
|
216
|
-
\textbf{Galaaz 2.0}
|
|
217
|
-
\textbf{\href{https://www.jruby.org/}{JRuby}}
|
|
218
|
-
\textbf{GNU R}---the same R distribution used for data
|
|
219
|
-
everywhere. A \textbf{bridge} evaluates R from Ruby and
|
|
220
|
-
between the two processes so that, from Ruby, you call R
|
|
221
|
-
work with R objects using familiar Ruby syntax. In other
|
|
222
|
-
programmer can use the capabilities of R without
|
|
223
|
-
syntax for day-to-day tasks.
|
|
239
|
+
\textbf{Galaaz 2.0} supports
|
|
240
|
+
\textbf{\href{https://www.jruby.org/}{JRuby}} or \textbf{CRuby} equally
|
|
241
|
+
and drives \textbf{GNU R}---the same R distribution used for data
|
|
242
|
+
science everywhere. A \textbf{bridge} evaluates R from Ruby and
|
|
243
|
+
exchanges data between the two processes so that, from Ruby, you call R
|
|
244
|
+
functions and work with R objects using familiar Ruby syntax. In other
|
|
245
|
+
words, a Ruby programmer can use the capabilities of R without
|
|
246
|
+
memorizing all of R's syntax for day-to-day tasks.
|
|
224
247
|
|
|
225
248
|
An \textbf{earlier line of work} used Oracle's \textbf{GraalVM} with
|
|
226
249
|
\textbf{TruffleRuby} and \textbf{FastR} so that Ruby and R could share
|
|
227
250
|
one JVM runtime. That stack is \textbf{no longer} what Galaaz targets;
|
|
228
|
-
today's Galaaz is developed and tested with \textbf{JRuby + GNU
|
|
229
|
-
the project manual for setup and command-line tools).
|
|
251
|
+
today's Galaaz is developed and tested with \textbf{JRuby or CRuby + GNU
|
|
252
|
+
R} (see the project manual for setup and command-line tools).
|
|
230
253
|
|
|
231
|
-
Library wrapping is a
|
|
254
|
+
Library wrapping is a common way to bring features from one language
|
|
232
255
|
into another. To improve performance, Python often wraps more efficient
|
|
233
256
|
C libraries. For the Python developer, the existence of such C libraries
|
|
234
257
|
is hidden. The problem with library wrapping is that for any new
|
|
@@ -239,12 +262,12 @@ language in Ruby. Doing so, all thousands of R libraries are available
|
|
|
239
262
|
immediately to Ruby developers without any new wrapping effort.
|
|
240
263
|
|
|
241
264
|
To show the power of Galaaz, we show in this article how Ruby can use
|
|
242
|
-
R's ggplot2 library
|
|
243
|
-
quality scientific plotting. We also show that migrating from R
|
|
244
|
-
with Galaaz is a matter of small syntactic changes. By using
|
|
245
|
-
developer can use all of Ruby's powerful object-oriented
|
|
246
|
-
with Ruby, it becomes much easier to move code from the
|
|
247
|
-
to the production phase.
|
|
265
|
+
R's ggplot2 library \textbf{transparently}, bringing to Ruby the power
|
|
266
|
+
of high-quality scientific plotting. We also show that migrating from R
|
|
267
|
+
to Ruby with Galaaz is a matter of small syntactic changes. By using
|
|
268
|
+
Ruby, the R developer can use all of Ruby's powerful object-oriented
|
|
269
|
+
features. Also, with Ruby, it becomes much easier to move code from the
|
|
270
|
+
analysis phase to the production phase.
|
|
248
271
|
|
|
249
272
|
In this article we will explore the R ToothGrowth dataset. To
|
|
250
273
|
illustrate, we will create some boxplots. A primer on boxplot is
|
|
@@ -261,15 +284,16 @@ special knowledge.
|
|
|
261
284
|
|
|
262
285
|
\href{https://towardsdatascience.com/ruby-plotting-with-galaaz-an-example-of-tightly-coupling-ruby-and-r-in-graalvm-520b69e21021}{Here}
|
|
263
286
|
is an older article (GraalVM-era Galaaz) with a scatter plot in Ruby;
|
|
264
|
-
the \textbf{ideas} still apply under Galaaz 2.0 with JRuby
|
|
287
|
+
the \textbf{ideas} still apply under Galaaz 2.0 with JRuby or CRuby and
|
|
288
|
+
GNU R.
|
|
265
289
|
|
|
266
290
|
\section{gKnit}\label{gknit}
|
|
267
291
|
|
|
268
292
|
\emph{Knitr} is an application that converts text written in rmarkdown
|
|
269
293
|
to many different output formats. For instance, a writer can convert an
|
|
270
|
-
rmarkdown document to HTML,
|
|
271
|
-
|
|
272
|
-
formats code chunks in a
|
|
294
|
+
rmarkdown document to HTML, LaTeX, Word, and many other formats. R
|
|
295
|
+
Markdown documents can contain text and \emph{code chunks}. knitr
|
|
296
|
+
formats code chunks in a shaded box in the output document. It also
|
|
273
297
|
executes the code chunks and formats the output in a white box. Every
|
|
274
298
|
line of output from the execution code is preceded by `\#\#'.
|
|
275
299
|
|
|
@@ -283,7 +307,7 @@ With \emph{gKnit} Ruby code chunks can share data.
|
|
|
283
307
|
\section{Exploring the Dataset}\label{exploring-the-dataset}
|
|
284
308
|
|
|
285
309
|
Let's start by exploring our selected dataset. ToothGrowth is an R
|
|
286
|
-
dataset. A dataset is like a simple
|
|
310
|
+
dataset. A dataset is like a simple Excel spreadsheet, in which each
|
|
287
311
|
column has only one type of data. For instance one column can have
|
|
288
312
|
float, the other integer, and a third strings. This dataset analyzes the
|
|
289
313
|
length of odontoblasts (cells responsible for tooth growth) in 60 guinea
|
|
@@ -293,17 +317,17 @@ or ascorbic acid (a form of vitamin C and coded as VC).
|
|
|
293
317
|
|
|
294
318
|
The ToothGrowth dataset contains three columns: `len', `supp' and
|
|
295
319
|
`dose'. Let's take a look at a few rows of this dataset. In Galaaz, R
|
|
296
|
-
variables are accessed by using the corresponding Ruby symbol
|
|
297
|
-
|
|
320
|
+
variables are accessed by using the corresponding Ruby symbol with the
|
|
321
|
+
tilde (\texttt{\textasciitilde{}}) operator. Note in the following chunk
|
|
298
322
|
that `ToothGrowth' is the R variable and Ruby's `tooth\_growth' is
|
|
299
|
-
assigned the value of `\textasciitilde:ToothGrowth'.
|
|
323
|
+
assigned the value of `\textasciitilde R{[}:ToothGrowth{]}'.
|
|
300
324
|
|
|
301
325
|
\begin{Shaded}
|
|
302
326
|
\begin{Highlighting}[]
|
|
303
327
|
\CommentTok{\# Read the R ToothGrowth variable and assign it to the}
|
|
304
328
|
\CommentTok{\# Ruby instance variable tooth\_growth that will be }
|
|
305
329
|
\CommentTok{\# available to all Ruby chunks in this document.}
|
|
306
|
-
\NormalTok{tooth\_growth }\OperatorTok{=} \OperatorTok{\textasciitilde{}}\WarningTok{:ToothGrowth}
|
|
330
|
+
\NormalTok{tooth\_growth }\OperatorTok{=} \OperatorTok{\textasciitilde{}}\ConstantTok{R}\KeywordTok{[}\WarningTok{:ToothGrowth}\KeywordTok{]}
|
|
307
331
|
\CommentTok{\# print the first few elements of the dataset}
|
|
308
332
|
\FunctionTok{puts}\NormalTok{ tooth\_growth}\AttributeTok{.head}
|
|
309
333
|
\end{Highlighting}
|
|
@@ -340,7 +364,7 @@ The `dose' column contains a numeric value with either, 0.5, 1 or 2,
|
|
|
340
364
|
although the first 6 rows as seen above only contain the 0.5 values.
|
|
341
365
|
Even though those are number, they are better interpreted as a
|
|
342
366
|
\href{https://swcarpentry.github.io/r-novice-inflammation/12-supp-factors/}{factor
|
|
343
|
-
or
|
|
367
|
+
or category}. So, let's convert our `dose' column from numeric to
|
|
344
368
|
`factor'. In R, the function `as.factor' is used to convert data in a
|
|
345
369
|
vector to factors. To use this function from Galaaz the dot (`.') in the
|
|
346
370
|
function name is substituted by '\_\_' (double underline). The function
|
|
@@ -431,7 +455,7 @@ R, this would be written as
|
|
|
431
455
|
you the flexibility to use either
|
|
432
456
|
\texttt{R.ggplot(\textless{}dataset\textgreater{},\ ...)} or
|
|
433
457
|
\texttt{\textless{}dataset\textgreater{}.ggplot(...)}. In the graph
|
|
434
|
-
specification
|
|
458
|
+
specification below, we use the second notation that looks more like
|
|
435
459
|
Ruby.\\
|
|
436
460
|
ggplot uses the `aes' method to specify x and y axes; in this case, the
|
|
437
461
|
`dose' on the \(x\) axis and the `length' on the \(y\) axis: `E.aes(x:
|
|
@@ -447,7 +471,7 @@ For a boxplot, the geom is R.geom\_boxplot.
|
|
|
447
471
|
\end{Highlighting}
|
|
448
472
|
\end{Shaded}
|
|
449
473
|
|
|
450
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/dose_len.png}}
|
|
474
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/dose_len.png}}
|
|
451
475
|
|
|
452
476
|
Great! We've just managed to create and save our first plot in Ruby with
|
|
453
477
|
only four lines of code. We can now easily see with this plot a clear
|
|
@@ -469,8 +493,8 @@ The parameter to the `facet\_grid' method is a
|
|
|
469
493
|
|
|
470
494
|
In Galaaz we give programmers the flexibility to use two different ways
|
|
471
495
|
to write formulas. In the first way, we use Ruby expressions and the
|
|
472
|
-
`.til' function. The formula `x \textasciitilde{} y', becomes
|
|
473
|
-
:y'. More information on expressions can be found in
|
|
496
|
+
`.til' function. The formula `x \textasciitilde{} y', becomes
|
|
497
|
+
`R{[}:x{]}.til :y'. More information on expressions can be found in
|
|
474
498
|
\href{https://www.rubydoc.info/gems/galaaz/}{Galaaz Manual}.
|
|
475
499
|
|
|
476
500
|
Another way of writing a formula is to use the `formula' function with
|
|
@@ -479,10 +503,11 @@ the actual formula as a string. The formula
|
|
|
479
503
|
\texttt{R.formula("x\ \textasciitilde{}\ y")}. For more complex
|
|
480
504
|
formulas, the use of the `formula' function is preferred.
|
|
481
505
|
|
|
482
|
-
The formula \texttt{:all.til\ :supp} indicates to the
|
|
483
|
-
function that it needs to facet the plot based on the
|
|
484
|
-
variable and split the plot vertically. Changing the
|
|
485
|
-
\texttt{:supp.til\ :all} would split the plot
|
|
506
|
+
The formula \texttt{R{[}:all{]}.til\ :supp} indicates to the
|
|
507
|
+
`facet\_grid' function that it needs to facet the plot based on the
|
|
508
|
+
\texttt{supp} variable and split the plot vertically. Changing the
|
|
509
|
+
formula to \texttt{R{[}:supp{]}.til\ :all} would split the plot
|
|
510
|
+
horizontally.
|
|
486
511
|
|
|
487
512
|
\begin{Shaded}
|
|
488
513
|
\begin{Highlighting}[]
|
|
@@ -490,13 +515,13 @@ variable and split the plot vertically. Changing the formula to
|
|
|
490
515
|
|
|
491
516
|
\NormalTok{bp }\OperatorTok{=}\NormalTok{ base\_tooth }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.geom\_boxplot} \OperatorTok{+}
|
|
492
517
|
\CommentTok{\# Split in vertical direction}
|
|
493
|
-
\ConstantTok{R}\AttributeTok{.facet\_grid}\NormalTok{(}\WarningTok{:all}\AttributeTok{.til} \OperatorTok{:}\NormalTok{supp)}
|
|
518
|
+
\ConstantTok{R}\AttributeTok{.facet\_grid}\NormalTok{(}\ConstantTok{R}\KeywordTok{[}\WarningTok{:all}\KeywordTok{]}\AttributeTok{.til} \OperatorTok{:}\NormalTok{supp)}
|
|
494
519
|
|
|
495
520
|
\FunctionTok{puts}\NormalTok{ bp}
|
|
496
521
|
\end{Highlighting}
|
|
497
522
|
\end{Shaded}
|
|
498
523
|
|
|
499
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facet_by_delivery.png}}
|
|
524
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facet_by_delivery.png}}
|
|
500
525
|
|
|
501
526
|
It now becomes clear that although both methods of delivery have a
|
|
502
527
|
direct impact on tooth growth, method (OJ) is non-linear having a higher
|
|
@@ -521,7 +546,7 @@ this command each `dose' factor gets its own color.
|
|
|
521
546
|
\end{Highlighting}
|
|
522
547
|
\end{Shaded}
|
|
523
548
|
|
|
524
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facets_by_delivery_color.png}}
|
|
549
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color.png}}
|
|
525
550
|
|
|
526
551
|
Facetting helps us compare the general trends for each delivery method.
|
|
527
552
|
Adding color allow us to compare specifically how each dosage impacts
|
|
@@ -567,7 +592,7 @@ experiment. For that, add the function `R.geom\_point' to the plot.
|
|
|
567
592
|
\end{Highlighting}
|
|
568
593
|
\end{Shaded}
|
|
569
594
|
|
|
570
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facets_with_points.png}}
|
|
595
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facets_with_points.png}}
|
|
571
596
|
|
|
572
597
|
Now we can see the actual distribution of all the 60 subjects. Actually,
|
|
573
598
|
this is not totally true. We have a hard time seing all 60 subjects. It
|
|
@@ -589,7 +614,7 @@ making them even easier to see.
|
|
|
589
614
|
\end{Highlighting}
|
|
590
615
|
\end{Shaded}
|
|
591
616
|
|
|
592
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facets_with_jitter.png}}
|
|
617
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facets_with_jitter.png}}
|
|
593
618
|
|
|
594
619
|
Now we can see all 60 points in the graph. We have here a much higher
|
|
595
620
|
information density and we can see outliers and subjects distribution.
|
|
@@ -629,14 +654,15 @@ order of the colors in the plot.
|
|
|
629
654
|
\begin{Shaded}
|
|
630
655
|
\begin{Highlighting}[]
|
|
631
656
|
\NormalTok{bp }\OperatorTok{=}\NormalTok{ bp }\OperatorTok{+}
|
|
632
|
-
\ConstantTok{R}\AttributeTok{.scale\_fill\_manual}\NormalTok{(}
|
|
633
|
-
|
|
657
|
+
\ConstantTok{R}\AttributeTok{.scale\_fill\_manual}\NormalTok{(}
|
|
658
|
+
\WarningTok{values:} \ConstantTok{R}\AttributeTok{.c}\NormalTok{(}\StringTok{"cyan"}\NormalTok{, }\StringTok{"deepskyblue"}\NormalTok{, }\StringTok{"deepskyblue4"}\NormalTok{),}
|
|
659
|
+
\WarningTok{breaks:} \ConstantTok{R}\AttributeTok{.c}\NormalTok{(}\StringTok{"2"}\NormalTok{, }\StringTok{"1"}\NormalTok{, }\StringTok{"0.5"}\NormalTok{))}
|
|
634
660
|
|
|
635
661
|
\FunctionTok{puts}\NormalTok{ bp}
|
|
636
662
|
\end{Highlighting}
|
|
637
663
|
\end{Shaded}
|
|
638
664
|
|
|
639
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facets_by_delivery_color2.png}}
|
|
665
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color2.png}}
|
|
640
666
|
|
|
641
667
|
\subsection{Violin Plot and Jitter}\label{violin-plot-and-jitter}
|
|
642
668
|
|
|
@@ -660,17 +686,19 @@ dot represents the median average value.
|
|
|
660
686
|
|
|
661
687
|
\begin{Shaded}
|
|
662
688
|
\begin{Highlighting}[]
|
|
663
|
-
\NormalTok{violin }\OperatorTok{=}\NormalTok{ base\_tooth }\OperatorTok{+}
|
|
664
|
-
\ConstantTok{R}\AttributeTok{.
|
|
689
|
+
\NormalTok{violin }\OperatorTok{=}\NormalTok{ base\_tooth }\OperatorTok{+}
|
|
690
|
+
\ConstantTok{R}\AttributeTok{.geom\_violin}\NormalTok{(}\ConstantTok{E}\AttributeTok{.aes}\NormalTok{(}\WarningTok{fill:} \WarningTok{:dose}\NormalTok{)) }\OperatorTok{+}
|
|
691
|
+
\ConstantTok{R}\AttributeTok{.facet\_grid}\NormalTok{(}\ConstantTok{R}\KeywordTok{[}\WarningTok{:all}\KeywordTok{]}\AttributeTok{.til} \OperatorTok{:}\NormalTok{supp) }\OperatorTok{+}
|
|
665
692
|
\ConstantTok{R}\AttributeTok{.geom\_jitter}\NormalTok{(}\WarningTok{shape:} \DecValTok{23}\NormalTok{, }\WarningTok{color:} \StringTok{"cyan3"}\NormalTok{, }\WarningTok{size:} \DecValTok{1}\NormalTok{) }\OperatorTok{+}
|
|
666
|
-
\ConstantTok{R}\AttributeTok{.scale\_fill\_manual}\NormalTok{(}
|
|
667
|
-
|
|
693
|
+
\ConstantTok{R}\AttributeTok{.scale\_fill\_manual}\NormalTok{(}
|
|
694
|
+
\WarningTok{values:} \ConstantTok{R}\AttributeTok{.c}\NormalTok{(}\StringTok{"cyan"}\NormalTok{, }\StringTok{"deepskyblue"}\NormalTok{, }\StringTok{"deepskyblue4"}\NormalTok{),}
|
|
695
|
+
\WarningTok{breaks:} \ConstantTok{R}\AttributeTok{.c}\NormalTok{(}\StringTok{"2"}\NormalTok{, }\StringTok{"1"}\NormalTok{, }\StringTok{"0.5"}\NormalTok{))}
|
|
668
696
|
|
|
669
697
|
\FunctionTok{puts}\NormalTok{ violin}
|
|
670
698
|
\end{Highlighting}
|
|
671
699
|
\end{Shaded}
|
|
672
700
|
|
|
673
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/violin_with_jitter.png}}
|
|
701
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/violin_with_jitter.png}}
|
|
674
702
|
|
|
675
703
|
This plot is an alternative to the original boxplot. For the final
|
|
676
704
|
presentation, it is important to think which graphics will be best
|
|
@@ -710,7 +738,7 @@ we defined a caption variable using Ruby's Here Doc style).
|
|
|
710
738
|
\end{Highlighting}
|
|
711
739
|
\end{Shaded}
|
|
712
740
|
|
|
713
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facets_with_decorations.png}}
|
|
741
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facets_with_decorations.png}}
|
|
714
742
|
|
|
715
743
|
\subsection{The Corp Theme}\label{the-corp-theme}
|
|
716
744
|
|
|
@@ -732,42 +760,43 @@ axis and written in `bold'.
|
|
|
732
760
|
\ControlFlowTok{module} \DataTypeTok{CorpTheme}
|
|
733
761
|
|
|
734
762
|
\ConstantTok{R}\AttributeTok{.install\_and\_loads} \VerbatimStringTok{\textquotesingle{}RColorBrewer\textquotesingle{}}
|
|
735
|
-
|
|
736
|
-
\CommentTok{\#{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}
|
|
737
|
-
\CommentTok{\# face
|
|
738
|
-
\CommentTok{\#{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}
|
|
739
|
-
|
|
763
|
+
|
|
764
|
+
\CommentTok{\# {-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}}
|
|
765
|
+
\CommentTok{\# face: 1=plain, 2=bold, 3=italic, 4=bold{-}italic}
|
|
766
|
+
\CommentTok{\# {-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}}
|
|
767
|
+
|
|
740
768
|
\ControlFlowTok{def} \DecValTok{self}\AttributeTok{.text\_element}\NormalTok{(size, }\WarningTok{face:} \StringTok{"plain"}\NormalTok{, }\WarningTok{hjust:} \DecValTok{nil}\NormalTok{)}
|
|
741
|
-
\ConstantTok{E}\AttributeTok{.element\_text}\NormalTok{(}\WarningTok{color:} \StringTok{"\#000080"}\NormalTok{,
|
|
769
|
+
\ConstantTok{E}\AttributeTok{.element\_text}\NormalTok{(}\WarningTok{color:} \StringTok{"\#000080"}\NormalTok{,}
|
|
742
770
|
\WarningTok{face:}\NormalTok{ face,}
|
|
743
771
|
\WarningTok{size:}\NormalTok{ size,}
|
|
744
|
-
|
|
772
|
+
\WarningTok{hjust:}\NormalTok{ hjust)}
|
|
745
773
|
\ControlFlowTok{end}
|
|
746
|
-
|
|
747
|
-
\CommentTok{\#{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}
|
|
748
|
-
\CommentTok{\#
|
|
749
|
-
\CommentTok{\#
|
|
750
|
-
\CommentTok{\#{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}
|
|
751
|
-
|
|
774
|
+
|
|
775
|
+
\CommentTok{\# {-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}}
|
|
776
|
+
\CommentTok{\# Plot theme: no major/minor grids or borders; optional}
|
|
777
|
+
\CommentTok{\# background for facets; turn off scientific notation.}
|
|
778
|
+
\CommentTok{\# {-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}{-}}
|
|
779
|
+
|
|
752
780
|
\ControlFlowTok{def} \DecValTok{self}\AttributeTok{.global\_theme}\NormalTok{(faceted }\OperatorTok{=} \DecValTok{false}\NormalTok{)}
|
|
753
|
-
|
|
781
|
+
|
|
754
782
|
\ConstantTok{R}\AttributeTok{.options}\NormalTok{(}\WarningTok{scipen:} \DecValTok{999}\NormalTok{) }\CommentTok{\# turn{-}off scientific notation like 1e+48}
|
|
755
|
-
\CommentTok{\#
|
|
756
|
-
|
|
783
|
+
\CommentTok{\# R.theme\_set(R.theme\_bw)}
|
|
784
|
+
|
|
757
785
|
\CommentTok{\# remove major grids}
|
|
758
786
|
\NormalTok{ gb }\OperatorTok{=} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{panel\_\_grid\_\_major:} \ConstantTok{E}\AttributeTok{.element\_blank}\NormalTok{())}
|
|
759
787
|
\CommentTok{\# remove minor grids}
|
|
760
788
|
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{panel\_\_grid\_\_minor:} \ConstantTok{E}\AttributeTok{.element\_blank}\NormalTok{)}
|
|
761
|
-
\CommentTok{\# gb = R.theme(panel\_\_grid\_\_minor: E.element\_blank)}
|
|
762
789
|
\CommentTok{\# remove border}
|
|
763
790
|
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{panel\_\_border:} \ConstantTok{E}\AttributeTok{.element\_blank}\NormalTok{)}
|
|
764
|
-
\CommentTok{\#
|
|
765
|
-
\
|
|
766
|
-
\NormalTok{
|
|
791
|
+
\CommentTok{\# Keep background on faceted plots (helps separate facets)}
|
|
792
|
+
\ControlFlowTok{if} \OperatorTok{!}\NormalTok{faceted}
|
|
793
|
+
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{panel\_\_background:} \ConstantTok{E}\AttributeTok{.element\_blank}\NormalTok{)}
|
|
794
|
+
\ControlFlowTok{end}
|
|
767
795
|
\CommentTok{\# Change axis font}
|
|
768
796
|
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{axis\_\_text:}\NormalTok{ text\_element(}\DecValTok{8}\NormalTok{))}
|
|
769
797
|
\CommentTok{\# change axis title font}
|
|
770
|
-
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}
|
|
798
|
+
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}
|
|
799
|
+
\WarningTok{axis\_\_title:}\NormalTok{ text\_element(}\DecValTok{10}\NormalTok{, }\WarningTok{face:} \StringTok{"bold"}\NormalTok{, }\WarningTok{hjust:} \DecValTok{1}\NormalTok{))}
|
|
771
800
|
\CommentTok{\# change font of title}
|
|
772
801
|
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{title:}\NormalTok{ text\_element(}\DecValTok{12}\NormalTok{, }\WarningTok{face:} \StringTok{"bold"}\NormalTok{))}
|
|
773
802
|
\CommentTok{\# change font of subtitle}
|
|
@@ -776,7 +805,7 @@ axis and written in `bold'.
|
|
|
776
805
|
\NormalTok{ gb }\OperatorTok{=}\NormalTok{ gb }\OperatorTok{+} \ConstantTok{R}\AttributeTok{.theme}\NormalTok{(}\WarningTok{plot\_\_caption:}\NormalTok{ text\_element(}\DecValTok{8}\NormalTok{))}
|
|
777
806
|
|
|
778
807
|
\ControlFlowTok{end}
|
|
779
|
-
|
|
808
|
+
|
|
780
809
|
\ControlFlowTok{end}
|
|
781
810
|
\end{Highlighting}
|
|
782
811
|
\end{Shaded}
|
|
@@ -799,7 +828,7 @@ Here is our final boxplot, without jitter.
|
|
|
799
828
|
\end{Highlighting}
|
|
800
829
|
\end{Shaded}
|
|
801
830
|
|
|
802
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/final_box_plot.png}}
|
|
831
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/final_box_plot.png}}
|
|
803
832
|
|
|
804
833
|
And here is the final violin plot, with jitter and the same look and
|
|
805
834
|
feel of the corporate boxplot.
|
|
@@ -810,7 +839,7 @@ feel of the corporate boxplot.
|
|
|
810
839
|
\end{Highlighting}
|
|
811
840
|
\end{Shaded}
|
|
812
841
|
|
|
813
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/final_violin_plot.png}}
|
|
842
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/final_violin_plot.png}}
|
|
814
843
|
|
|
815
844
|
\subsection{Another View}\label{another-view}
|
|
816
845
|
|
|
@@ -826,9 +855,12 @@ of graphics}.
|
|
|
826
855
|
\DocumentationTok{Each animal received one of three dose levels of vitamin C.}
|
|
827
856
|
\ControlFlowTok{EOT}
|
|
828
857
|
|
|
829
|
-
\NormalTok{bp }\OperatorTok{=}\NormalTok{ tooth\_growth}\AttributeTok{.ggplot}\NormalTok{(}
|
|
830
|
-
|
|
831
|
-
\ConstantTok{R}\AttributeTok{.
|
|
858
|
+
\NormalTok{bp }\OperatorTok{=}\NormalTok{ tooth\_growth}\AttributeTok{.ggplot}\NormalTok{(}
|
|
859
|
+
\ConstantTok{E}\AttributeTok{.aes}\NormalTok{(}\WarningTok{x:} \WarningTok{:supp}\NormalTok{, }\WarningTok{y:} \WarningTok{:len}\NormalTok{, }\WarningTok{group:} \WarningTok{:supp}\NormalTok{)) }\OperatorTok{+}
|
|
860
|
+
\ConstantTok{R}\AttributeTok{.geom\_boxplot}\NormalTok{(}\ConstantTok{E}\AttributeTok{.aes}\NormalTok{(}\WarningTok{fill:} \WarningTok{:supp}\NormalTok{)) }\OperatorTok{+}
|
|
861
|
+
\ConstantTok{R}\AttributeTok{.facet\_grid}\NormalTok{(}\ConstantTok{R}\KeywordTok{[}\WarningTok{:all}\KeywordTok{]}\AttributeTok{.til} \OperatorTok{:}\NormalTok{dose) }\OperatorTok{+}
|
|
862
|
+
\ConstantTok{R}\AttributeTok{.scale\_fill\_manual}\NormalTok{(}
|
|
863
|
+
\WarningTok{values:} \ConstantTok{R}\AttributeTok{.c}\NormalTok{(}\StringTok{"cyan"}\NormalTok{, }\StringTok{"deepskyblue4"}\NormalTok{)) }\OperatorTok{+}
|
|
832
864
|
\ConstantTok{R}\AttributeTok{.labs}\NormalTok{(}\WarningTok{title:} \StringTok{"Tooth Growth: Length by Dose"}\NormalTok{,}
|
|
833
865
|
\WarningTok{subtitle:} \StringTok{"Faceted by dose"}\NormalTok{,}
|
|
834
866
|
\WarningTok{x:} \StringTok{"Delivery method"}\NormalTok{, }\WarningTok{y:} \StringTok{"Teeth length"}\NormalTok{,}
|
|
@@ -839,7 +871,7 @@ of graphics}.
|
|
|
839
871
|
\end{Highlighting}
|
|
840
872
|
\end{Shaded}
|
|
841
873
|
|
|
842
|
-
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/figure-latex/facet_by_dose.png}}
|
|
874
|
+
\pandocbounded{\includegraphics[keepaspectratio]{ruby_plot_files/ruby_plot_files/figure-latex/facet_by_dose.png}}
|
|
843
875
|
|
|
844
876
|
\section{Conclusion}\label{conclusion}
|
|
845
877
|
|
|
@@ -856,15 +888,16 @@ enormous endeavour and would probably never be accomplished. Today's
|
|
|
856
888
|
data scientists would certainly stick with either Python or R. Now, both
|
|
857
889
|
the Ruby and R communities can benefit from this marriage:
|
|
858
890
|
\textbf{Galaaz 2.0} uses \textbf{standard GNU R} for statistics and
|
|
859
|
-
graphics and \textbf{JRuby} for application code
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
documents, not by a
|
|
891
|
+
graphics and \textbf{JRuby or CRuby} for application code (prefer
|
|
892
|
+
\textbf{JRuby} when you want real threads and the JVM ecosystem). We
|
|
893
|
+
presented the process to couple Ruby and R; the coupling is implemented
|
|
894
|
+
by the Galaaz bridge and \textbf{gKnit} for literate documents, not by a
|
|
895
|
+
single GraalVM polyglot runtime.
|
|
863
896
|
|
|
864
897
|
For performance, expect \textbf{ordinary GNU R} behaviour for model
|
|
865
|
-
fitting and plotting, while \textbf{JRuby}
|
|
866
|
-
threads} on the Ruby side and access to Java libraries when you
|
|
867
|
-
them.
|
|
898
|
+
fitting and plotting, while \textbf{JRuby} can give \textbf{real
|
|
899
|
+
parallel threads} on the Ruby side and access to Java libraries when you
|
|
900
|
+
need them.
|
|
868
901
|
|
|
869
902
|
This article has shown how to improve a plot step-by-step. Starting from
|
|
870
903
|
a very simple boxplot with all default configurations, we moved slowly
|
|
@@ -885,10 +918,8 @@ Rubyist trying to write articles, blogs or documentation for Ruby.
|
|
|
885
918
|
\begin{itemize}
|
|
886
919
|
\tightlist
|
|
887
920
|
\item
|
|
888
|
-
\textbf{JRuby}
|
|
889
|
-
|
|
890
|
-
\item
|
|
891
|
-
A \textbf{JDK} compatible with your JRuby version
|
|
921
|
+
\textbf{JRuby} and a compatible \textbf{JDK}, \emph{or} \textbf{CRuby
|
|
922
|
+
3.3+}
|
|
892
923
|
\item
|
|
893
924
|
\textbf{GNU R} --- \texttt{R} on your \texttt{PATH}, with
|
|
894
925
|
compilers/tools available if packages must be built from source
|
|
@@ -933,8 +964,9 @@ required.
|
|
|
933
964
|
In Ruby code:
|
|
934
965
|
\texttt{require\ \textquotesingle{}galaaz\textquotesingle{}}
|
|
935
966
|
\item
|
|
936
|
-
|
|
937
|
-
\textbf{\texttt{bin/galaaz-jruby}}
|
|
967
|
+
Run Ruby with \textbf{\texttt{bin/galaaz-ruby}} (either engine) or
|
|
968
|
+
\textbf{\texttt{bin/galaaz-jruby}} when you need JRuby JVM flags (see
|
|
969
|
+
the manual).
|
|
938
970
|
\end{itemize}
|
|
939
971
|
|
|
940
972
|
\end{document}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color.png
ADDED
|
Binary file
|
data/blogs/ruby_plot/ruby_plot_files/ruby_plot_files/figure-latex/facets_by_delivery_color2.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|