galaaz 2.1.7 → 2.1.9
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 +39 -0
- data/Rakefile +20 -2
- data/bin/check_gemfile_lock_version +46 -0
- data/bin/release_bump +26 -0
- data/blogs/README.md +4 -0
- data/blogs/galaaz_2_0/galaaz_2_0.Rmd +385 -0
- data/blogs/galaaz_2_0/galaaz_2_0.md +409 -0
- data/blogs/galaaz_2_0/galaaz_2_0.tex +756 -0
- data/blogs/galaaz_2_0/images/galaaz-header.png +0 -0
- data/blogs/galaaz_2_0/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +76 -58
- data/blogs/galaaz_ggplot/galaaz_ggplot.md +188 -161
- data/blogs/galaaz_ggplot/galaaz_ggplot.tex +185 -117
- 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/galaaz_ggplot/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/gknit/gknit.Rmd +48 -28
- data/blogs/gknit/gknit.md +60 -43
- data/blogs/gknit/gknit.tex +1409 -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/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/manual/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/manual/manual.Rmd +161 -71
- data/blogs/manual/manual.md +573 -482
- data/blogs/manual/manual.tex +1113 -517
- 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/nse_dplyr/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/nse_dplyr/nse_dplyr.Rmd +42 -8
- data/blogs/nse_dplyr/nse_dplyr.md +69 -50
- data/blogs/nse_dplyr/nse_dplyr.tex +1626 -0
- data/blogs/oh_my/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/oh_my/oh_my.Rmd +206 -55
- data/blogs/oh_my/oh_my.md +247 -96
- data/blogs/oh_my/oh_my.tex +2038 -93
- data/blogs/r_on_rails_ledger/images/00_portfolio_page.png +0 -0
- data/blogs/r_on_rails_ledger/images/01_results_panel.png +0 -0
- data/blogs/r_on_rails_ledger/images/02_density_tail_risk.png +0 -0
- data/blogs/r_on_rails_ledger/images/03_mc_cone.png +0 -0
- data/blogs/r_on_rails_ledger/images/04_rolling_var.png +0 -0
- data/blogs/r_on_rails_ledger/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/r_on_rails_ledger/r_on_rails_ledger.Rmd +354 -0
- data/blogs/r_on_rails_ledger/r_on_rails_ledger.md +365 -0
- data/blogs/r_on_rails_ledger/r_on_rails_ledger.tex +670 -0
- data/blogs/ruby_plot/images/galaaz-lockup-stacked.png +0 -0
- data/blogs/ruby_plot/ruby_plot.Rmd +56 -35
- data/blogs/ruby_plot/ruby_plot.md +63 -47
- data/blogs/ruby_plot/ruby_plot.tex +194 -125
- 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 +98 -13
- data/logos/icon-font/README.md +27 -0
- data/logos/icon-font/build_font.py +130 -0
- data/logos/icon-font/galaaz-mark.svg +34 -0
- data/script/omarchy/README.md +9 -2
- data/script/omarchy/fonts/galaaz.ttf +0 -0
- data/script/omarchy/galaaz-guide.sh +1 -1
- data/script/omarchy/install-galaaz.sh +8 -1
- data/script/omarchy/omarchy-menu.jsonc +21 -9
- data/sty/galaaz-header.png +0 -0
- data/sty/galaaz-headers-from-p3.tex +4 -0
- data/sty/galaaz.sty +76 -23
- data/version.rb +1 -1
- metadata +46 -7
- data/blogs/galaaz_ggplot/galaaz_ggplot.log +0 -754
- data/blogs/manual/manual.log +0 -1786
- data/blogs/nse_dplyr/nse_dplyr.log +0 -928
- data/blogs/oh_my/oh_my.log +0 -804
- data/blogs/ruby_plot/ruby_plot.log +0 -885
data/blogs/gknit/gknit.Rmd
CHANGED
|
@@ -9,16 +9,32 @@ bibliography: stats.bib
|
|
|
9
9
|
output:
|
|
10
10
|
pdf_document:
|
|
11
11
|
includes:
|
|
12
|
-
in_header:
|
|
12
|
+
in_header:
|
|
13
|
+
- "../../sty/galaaz.sty"
|
|
14
|
+
- "../../sty/galaaz-headers-from-p3.tex"
|
|
15
|
+
keep_tex: yes
|
|
13
16
|
number_sections: yes
|
|
17
|
+
toc: true
|
|
18
|
+
toc_depth: 2
|
|
14
19
|
html_document:
|
|
15
20
|
self_contained: true
|
|
16
21
|
keep_md: true
|
|
22
|
+
toc: true
|
|
23
|
+
toc_float: true
|
|
24
|
+
toc_depth: 2
|
|
25
|
+
number_sections: true
|
|
26
|
+
includes:
|
|
27
|
+
before_body: _logo_before_body.html
|
|
17
28
|
biblio-style: apsr
|
|
18
29
|
---
|
|
19
30
|
|
|
20
31
|
```{r setup, echo=FALSE}
|
|
32
|
+
options(width = 70)
|
|
33
|
+
```
|
|
21
34
|
|
|
35
|
+
```{r brand_logo, echo=FALSE, fig.align='center', out.width='45%', eval=knitr::is_latex_output()}
|
|
36
|
+
# PDF only — HTML uses _logo_before_body.html (above the TOC).
|
|
37
|
+
knitr::include_graphics("images/galaaz-lockup-stacked.png")
|
|
22
38
|
```
|
|
23
39
|
|
|
24
40
|
# Introduction
|
|
@@ -305,15 +321,17 @@ a linear regression line (method = "lm") for every manufacturer.
|
|
|
305
321
|
library(ggplot2)
|
|
306
322
|
data(mpg, package="ggplot2")
|
|
307
323
|
|
|
308
|
-
mpg_select <- mpg[
|
|
324
|
+
mpg_select <- mpg[
|
|
325
|
+
mpg$manufacturer %in% c("audi", "ford", "honda", "hyundai"),
|
|
326
|
+
]
|
|
309
327
|
|
|
310
328
|
# Scatterplot
|
|
311
329
|
theme_set(theme_bw()) # pre-set the bw theme.
|
|
312
|
-
g <- ggplot(mpg_select, aes(displ, cty)) +
|
|
330
|
+
g <- ggplot(mpg_select, aes(displ, cty)) +
|
|
313
331
|
labs(subtitle="mpg: Displacement vs City Mileage",
|
|
314
332
|
title="Bubble chart")
|
|
315
333
|
|
|
316
|
-
g + geom_jitter(aes(col=manufacturer, size=hwy)) +
|
|
334
|
+
g + geom_jitter(aes(col=manufacturer, size=hwy)) +
|
|
317
335
|
geom_smooth(aes(col=manufacturer), method="lm", se=F)
|
|
318
336
|
```
|
|
319
337
|
|
|
@@ -411,42 +429,43 @@ ten aspects are:
|
|
|
411
429
|
# copy the R variable :mtcars to the Ruby mtcars variable
|
|
412
430
|
mtcars = ~R[:mtcars]
|
|
413
431
|
|
|
414
|
-
#
|
|
415
|
-
#
|
|
416
|
-
# data for plotting
|
|
432
|
+
# New column 'car_name' for plotting (rownames alone are not
|
|
433
|
+
# usable as plot data).
|
|
417
434
|
mtcars.car_name = R.rownames(:mtcars)
|
|
418
435
|
|
|
419
|
-
#
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
# deviation 'sd'. The vector is then rounded to two digits with 'round 2'
|
|
423
|
-
mtcars.mpg_z = ((mtcars.mpg - mtcars.mpg.mean)/mtcars.mpg.sd).round 2
|
|
436
|
+
# Normalized mpg in column mpg_z: (mpg - mean) / sd, rounded.
|
|
437
|
+
mtcars.mpg_z =
|
|
438
|
+
((mtcars.mpg - mtcars.mpg.mean) / mtcars.mpg.sd).round 2
|
|
424
439
|
|
|
425
|
-
#
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
mtcars.mpg_type = (mtcars.mpg_z < 0).ifelse("below", "above")
|
|
440
|
+
# mpg_type: 'below' if mpg_z < 0, else 'above' (vectorized ifelse).
|
|
441
|
+
mtcars.mpg_type =
|
|
442
|
+
(mtcars.mpg_z < 0).ifelse("below", "above")
|
|
429
443
|
|
|
430
|
-
#
|
|
444
|
+
# Order rows by mpg_z ascending.
|
|
431
445
|
mtcars = mtcars[mtcars.mpg_z.order, :all]
|
|
432
446
|
|
|
433
|
-
#
|
|
434
|
-
mtcars.car_name =
|
|
447
|
+
# Factor car_name so plot keeps sorted order.
|
|
448
|
+
mtcars.car_name =
|
|
449
|
+
mtcars.car_name.factor levels: mtcars.car_name
|
|
435
450
|
|
|
436
|
-
#
|
|
451
|
+
# First records of the final data frame
|
|
437
452
|
puts mtcars.head
|
|
438
453
|
```
|
|
439
454
|
|
|
440
455
|
```{ruby diverging_bar, fig.width = 9.1, fig.height = 6.5}
|
|
441
456
|
require 'ggplot'
|
|
442
457
|
|
|
443
|
-
puts mtcars.ggplot(
|
|
444
|
-
|
|
445
|
-
R.
|
|
446
|
-
|
|
447
|
-
|
|
458
|
+
puts mtcars.ggplot(
|
|
459
|
+
E.aes(x: :car_name, y: :mpg_z, label: :mpg_z)) +
|
|
460
|
+
R.geom_bar(E.aes(fill: :mpg_type),
|
|
461
|
+
stat: 'identity', width: 0.5) +
|
|
462
|
+
R.scale_fill_manual(
|
|
463
|
+
name: 'Mileage',
|
|
464
|
+
labels: R.c('Above Average', 'Below Average'),
|
|
465
|
+
values: R.c('above': '#00ba38',
|
|
466
|
+
'below': '#f8766d')) +
|
|
448
467
|
R.labs(subtitle: "Normalised mileage from 'mtcars'",
|
|
449
|
-
title: "Diverging Bars") +
|
|
468
|
+
title: "Diverging Bars") +
|
|
450
469
|
R.coord_flip
|
|
451
470
|
```
|
|
452
471
|
|
|
@@ -459,7 +478,8 @@ with the 'rb' engine. The following chunk specification will
|
|
|
459
478
|
create and inline Ruby text:
|
|
460
479
|
|
|
461
480
|
````
|
|
462
|
-
This is some text with inline Ruby accessing
|
|
481
|
+
This is some text with inline Ruby accessing
|
|
482
|
+
variable 'b' which has value:
|
|
463
483
|
```{rb puts "```{rb puts b}\n```"}
|
|
464
484
|
```
|
|
465
485
|
and is followed by some other text!
|
|
@@ -658,7 +678,7 @@ the Yaml header to generate this blog in PDF format instead of HTML:
|
|
|
658
678
|
|
|
659
679
|
```
|
|
660
680
|
---
|
|
661
|
-
title: "gKnit - Ruby and R Knitting with Galaaz
|
|
681
|
+
title: "gKnit - Ruby and R Knitting with Galaaz"
|
|
662
682
|
author: "Rodrigo Botafogo"
|
|
663
683
|
tags: [Galaaz, Ruby, R, JRuby, CRuby, "GNU R", knitr, gknit]
|
|
664
684
|
date: "29 October 2018"
|
data/blogs/gknit/gknit.md
CHANGED
|
@@ -9,16 +9,29 @@ bibliography: stats.bib
|
|
|
9
9
|
output:
|
|
10
10
|
pdf_document:
|
|
11
11
|
includes:
|
|
12
|
-
in_header:
|
|
12
|
+
in_header:
|
|
13
|
+
- "../../sty/galaaz.sty"
|
|
14
|
+
- "../../sty/galaaz-headers-from-p3.tex"
|
|
15
|
+
keep_tex: yes
|
|
13
16
|
number_sections: yes
|
|
17
|
+
toc: true
|
|
18
|
+
toc_depth: 2
|
|
14
19
|
html_document:
|
|
15
20
|
self_contained: true
|
|
16
21
|
keep_md: true
|
|
22
|
+
toc: true
|
|
23
|
+
toc_float: true
|
|
24
|
+
toc_depth: 2
|
|
25
|
+
number_sections: true
|
|
26
|
+
includes:
|
|
27
|
+
before_body: _logo_before_body.html
|
|
17
28
|
biblio-style: apsr
|
|
18
29
|
---
|
|
19
30
|
|
|
20
31
|
|
|
21
32
|
|
|
33
|
+
|
|
34
|
+
|
|
22
35
|
# Introduction
|
|
23
36
|
|
|
24
37
|
The idea of "literate programming" was first introduced by Donald Knuth in the
|
|
@@ -347,15 +360,17 @@ a linear regression line (method = "lm") for every manufacturer.
|
|
|
347
360
|
library(ggplot2)
|
|
348
361
|
data(mpg, package="ggplot2")
|
|
349
362
|
|
|
350
|
-
mpg_select <- mpg[
|
|
363
|
+
mpg_select <- mpg[
|
|
364
|
+
mpg$manufacturer %in% c("audi", "ford", "honda", "hyundai"),
|
|
365
|
+
]
|
|
351
366
|
|
|
352
367
|
# Scatterplot
|
|
353
368
|
theme_set(theme_bw()) # pre-set the bw theme.
|
|
354
|
-
g <- ggplot(mpg_select, aes(displ, cty)) +
|
|
369
|
+
g <- ggplot(mpg_select, aes(displ, cty)) +
|
|
355
370
|
labs(subtitle="mpg: Displacement vs City Mileage",
|
|
356
371
|
title="Bubble chart")
|
|
357
372
|
|
|
358
|
-
g + geom_jitter(aes(col=manufacturer, size=hwy)) +
|
|
373
|
+
g + geom_jitter(aes(col=manufacturer, size=hwy)) +
|
|
359
374
|
geom_smooth(aes(col=manufacturer), method="lm", se=F)
|
|
360
375
|
```
|
|
361
376
|
|
|
@@ -479,60 +494,61 @@ ten aspects are:
|
|
|
479
494
|
# copy the R variable :mtcars to the Ruby mtcars variable
|
|
480
495
|
mtcars = ~R[:mtcars]
|
|
481
496
|
|
|
482
|
-
#
|
|
483
|
-
#
|
|
484
|
-
# data for plotting
|
|
497
|
+
# New column 'car_name' for plotting (rownames alone are not
|
|
498
|
+
# usable as plot data).
|
|
485
499
|
mtcars.car_name = R.rownames(:mtcars)
|
|
486
500
|
|
|
487
|
-
#
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
# deviation 'sd'. The vector is then rounded to two digits with 'round 2'
|
|
491
|
-
mtcars.mpg_z = ((mtcars.mpg - mtcars.mpg.mean)/mtcars.mpg.sd).round 2
|
|
501
|
+
# Normalized mpg in column mpg_z: (mpg - mean) / sd, rounded.
|
|
502
|
+
mtcars.mpg_z =
|
|
503
|
+
((mtcars.mpg - mtcars.mpg.mean) / mtcars.mpg.sd).round 2
|
|
492
504
|
|
|
493
|
-
#
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
mtcars.mpg_type = (mtcars.mpg_z < 0).ifelse("below", "above")
|
|
505
|
+
# mpg_type: 'below' if mpg_z < 0, else 'above' (vectorized ifelse).
|
|
506
|
+
mtcars.mpg_type =
|
|
507
|
+
(mtcars.mpg_z < 0).ifelse("below", "above")
|
|
497
508
|
|
|
498
|
-
#
|
|
509
|
+
# Order rows by mpg_z ascending.
|
|
499
510
|
mtcars = mtcars[mtcars.mpg_z.order, :all]
|
|
500
511
|
|
|
501
|
-
#
|
|
502
|
-
mtcars.car_name =
|
|
512
|
+
# Factor car_name so plot keeps sorted order.
|
|
513
|
+
mtcars.car_name =
|
|
514
|
+
mtcars.car_name.factor levels: mtcars.car_name
|
|
503
515
|
|
|
504
|
-
#
|
|
516
|
+
# First records of the final data frame
|
|
505
517
|
puts mtcars.head
|
|
506
518
|
```
|
|
507
519
|
|
|
508
520
|
```
|
|
509
|
-
## mpg cyl disp hp drat wt qsec vs am gear
|
|
510
|
-
## Cadillac Fleetwood 10.4 8 472 205 2.93 5.250 17.98 0 0 3
|
|
511
|
-
## Lincoln Continental 10.4 8 460 215 3.00 5.424 17.82 0 0 3
|
|
512
|
-
## Camaro Z28 13.3 8 350 245 3.73 3.840 15.41 0 0 3
|
|
513
|
-
## Duster 360 14.3 8 360 245 3.21 3.570 15.84 0 0 3
|
|
514
|
-
## Chrysler Imperial 14.7 8 440 230 3.23 5.345 17.42 0 0 3
|
|
515
|
-
## Maserati Bora 15.0 8 301 335 3.54 3.570 14.60 0 1 5
|
|
516
|
-
##
|
|
517
|
-
## Cadillac Fleetwood
|
|
518
|
-
## Lincoln Continental Lincoln Continental -1.61 below
|
|
519
|
-
## Camaro Z28
|
|
520
|
-
## Duster 360
|
|
521
|
-
## Chrysler Imperial
|
|
522
|
-
## Maserati Bora
|
|
521
|
+
## mpg cyl disp hp drat wt qsec vs am gear
|
|
522
|
+
## Cadillac Fleetwood 10.4 8 472 205 2.93 5.250 17.98 0 0 3
|
|
523
|
+
## Lincoln Continental 10.4 8 460 215 3.00 5.424 17.82 0 0 3
|
|
524
|
+
## Camaro Z28 13.3 8 350 245 3.73 3.840 15.41 0 0 3
|
|
525
|
+
## Duster 360 14.3 8 360 245 3.21 3.570 15.84 0 0 3
|
|
526
|
+
## Chrysler Imperial 14.7 8 440 230 3.23 5.345 17.42 0 0 3
|
|
527
|
+
## Maserati Bora 15.0 8 301 335 3.54 3.570 14.60 0 1 5
|
|
528
|
+
## carb car_name mpg_z mpg_type
|
|
529
|
+
## Cadillac Fleetwood 4 Cadillac Fleetwood -1.61 below
|
|
530
|
+
## Lincoln Continental 4 Lincoln Continental -1.61 below
|
|
531
|
+
## Camaro Z28 4 Camaro Z28 -1.13 below
|
|
532
|
+
## Duster 360 4 Duster 360 -0.96 below
|
|
533
|
+
## Chrysler Imperial 4 Chrysler Imperial -0.89 below
|
|
534
|
+
## Maserati Bora 8 Maserati Bora -0.84 below
|
|
523
535
|
```
|
|
524
536
|
|
|
525
537
|
|
|
526
538
|
``` ruby
|
|
527
539
|
require 'ggplot'
|
|
528
540
|
|
|
529
|
-
puts mtcars.ggplot(
|
|
530
|
-
|
|
531
|
-
R.
|
|
532
|
-
|
|
533
|
-
|
|
541
|
+
puts mtcars.ggplot(
|
|
542
|
+
E.aes(x: :car_name, y: :mpg_z, label: :mpg_z)) +
|
|
543
|
+
R.geom_bar(E.aes(fill: :mpg_type),
|
|
544
|
+
stat: 'identity', width: 0.5) +
|
|
545
|
+
R.scale_fill_manual(
|
|
546
|
+
name: 'Mileage',
|
|
547
|
+
labels: R.c('Above Average', 'Below Average'),
|
|
548
|
+
values: R.c('above': '#00ba38',
|
|
549
|
+
'below': '#f8766d')) +
|
|
534
550
|
R.labs(subtitle: "Normalised mileage from 'mtcars'",
|
|
535
|
-
title: "Diverging Bars") +
|
|
551
|
+
title: "Diverging Bars") +
|
|
536
552
|
R.coord_flip
|
|
537
553
|
```
|
|
538
554
|
|
|
@@ -548,7 +564,8 @@ with the 'rb' engine. The following chunk specification will
|
|
|
548
564
|
create and inline Ruby text:
|
|
549
565
|
|
|
550
566
|
````
|
|
551
|
-
This is some text with inline Ruby accessing
|
|
567
|
+
This is some text with inline Ruby accessing
|
|
568
|
+
variable 'b' which has value:
|
|
552
569
|
```{rb puts b}
|
|
553
570
|
```
|
|
554
571
|
and is followed by some other text!
|
|
@@ -1337,7 +1354,7 @@ module Find
|
|
|
1337
1354
|
# Skips the current file or directory, restarting the loop with the next
|
|
1338
1355
|
# entry. If the current file is a directory, that directory will not be
|
|
1339
1356
|
# recursively entered. Meaningful only within the block associated with
|
|
1340
|
-
# Find
|
|
1357
|
+
# Find::find.
|
|
1341
1358
|
#
|
|
1342
1359
|
# See the +Find+ module documentation for an example.
|
|
1343
1360
|
#
|
|
@@ -1361,7 +1378,7 @@ the Yaml header to generate this blog in PDF format instead of HTML:
|
|
|
1361
1378
|
|
|
1362
1379
|
```
|
|
1363
1380
|
---
|
|
1364
|
-
title: "gKnit - Ruby and R Knitting with Galaaz
|
|
1381
|
+
title: "gKnit - Ruby and R Knitting with Galaaz"
|
|
1365
1382
|
author: "Rodrigo Botafogo"
|
|
1366
1383
|
tags: [Galaaz, Ruby, R, JRuby, CRuby, "GNU R", knitr, gknit]
|
|
1367
1384
|
date: "29 October 2018"
|