galaaz 0.4.6 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +3575 -118
- data/Rakefile +21 -4
- data/bin/gknit +152 -6
- data/bin/gknit-draft +105 -0
- data/bin/gknit-draft.rb +28 -0
- data/bin/gknit_Rscript +127 -0
- data/bin/grun +27 -1
- data/bin/gstudio +47 -4
- data/bin/{gstudio.rb → gstudio_irb.rb} +0 -0
- data/bin/gstudio_pry.rb +7 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +3 -12
- data/blogs/galaaz_ggplot/galaaz_ggplot.html +77 -222
- data/blogs/galaaz_ggplot/galaaz_ggplot.md +4 -31
- data/blogs/galaaz_ggplot/galaaz_ggplot.pdf +0 -0
- 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/midwest.Rmd +1 -9
- data/blogs/gknit/gknit.Rmd +232 -123
- data/blogs/{dev/dev.html → gknit/gknit.html} +1897 -33
- data/blogs/gknit/gknit.pdf +0 -0
- data/blogs/gknit/lst.rds +0 -0
- data/blogs/gknit/stats.bib +27 -0
- data/blogs/manual/lst.rds +0 -0
- data/blogs/manual/manual.Rmd +1893 -47
- data/blogs/manual/manual.html +3153 -347
- data/blogs/manual/manual.md +3575 -118
- data/blogs/manual/manual.pdf +0 -0
- data/blogs/manual/manual.tex +4026 -0
- data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
- data/blogs/manual/manual_files/figure-html/diverging_bar.png +0 -0
- data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
- data/blogs/manual/manual_files/figure-latex/diverging_bar.pdf +0 -0
- data/blogs/{dev → manual}/model.rb +0 -0
- data/blogs/nse_dplyr/nse_dplyr.Rmd +849 -0
- data/blogs/nse_dplyr/nse_dplyr.html +878 -0
- data/blogs/nse_dplyr/nse_dplyr.md +1198 -0
- data/blogs/nse_dplyr/nse_dplyr.pdf +0 -0
- data/blogs/oh_my/oh_my.html +274 -386
- data/blogs/oh_my/oh_my.md +208 -205
- data/blogs/ruby_plot/ruby_plot.Rmd +64 -84
- data/blogs/ruby_plot/ruby_plot.html +235 -208
- data/blogs/ruby_plot/ruby_plot.md +239 -34
- data/blogs/ruby_plot/ruby_plot.pdf +0 -0
- 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/examples/Bibliography/master.bib +50 -0
- data/examples/Bibliography/stats.bib +72 -0
- data/examples/islr/ch2.spec.rb +1 -1
- data/examples/islr/ch3_boston.rb +4 -4
- data/examples/islr/x_y_rnorm.jpg +0 -0
- data/examples/latex_templates/Test-acm_article/Makefile +16 -0
- data/examples/latex_templates/Test-acm_article/Test-acm_article.Rmd +65 -0
- data/examples/latex_templates/Test-acm_article/acm_proc_article-sp.cls +1670 -0
- data/examples/latex_templates/Test-acm_article/sensys-abstract.cls +703 -0
- data/examples/latex_templates/Test-acm_article/sigproc.bib +59 -0
- data/examples/latex_templates/Test-acs_article/Test-acs_article.Rmd +260 -0
- data/examples/latex_templates/Test-acs_article/Test-acs_article.pdf +0 -0
- data/examples/latex_templates/Test-acs_article/acs-Test-acs_article.bib +11 -0
- data/examples/latex_templates/Test-acs_article/acs-my_output.bib +11 -0
- data/examples/latex_templates/Test-acs_article/acstest.bib +17 -0
- data/examples/latex_templates/Test-aea_article/AEA.cls +1414 -0
- data/examples/latex_templates/Test-aea_article/BibFile.bib +0 -0
- data/examples/latex_templates/Test-aea_article/Test-aea_article.Rmd +108 -0
- data/examples/latex_templates/Test-aea_article/Test-aea_article.pdf +0 -0
- data/examples/latex_templates/Test-aea_article/aea.bst +1269 -0
- data/examples/latex_templates/Test-aea_article/multicol.sty +853 -0
- data/examples/latex_templates/Test-aea_article/references.bib +0 -0
- data/examples/latex_templates/Test-aea_article/setspace.sty +546 -0
- data/examples/latex_templates/Test-amq_article/Test-amq_article.Rmd +256 -0
- data/examples/latex_templates/Test-amq_article/Test-amq_article.pdf +0 -0
- data/examples/latex_templates/Test-amq_article/Test-amq_article.pdfsync +3397 -0
- data/examples/latex_templates/Test-amq_article/pics/Figure2.pdf +0 -0
- data/examples/latex_templates/Test-ams_article/Test-ams_article.Rmd +215 -0
- data/examples/latex_templates/Test-ams_article/amstest.bib +436 -0
- data/examples/latex_templates/Test-asa_article/Test-asa_article.Rmd +153 -0
- data/examples/latex_templates/Test-asa_article/Test-asa_article.pdf +0 -0
- data/examples/latex_templates/Test-asa_article/agsm.bst +1353 -0
- data/examples/latex_templates/Test-asa_article/bibliography.bib +233 -0
- data/examples/latex_templates/Test-ieee_article/IEEEtran.bst +2409 -0
- data/examples/latex_templates/Test-ieee_article/IEEEtran.cls +6346 -0
- data/examples/latex_templates/Test-ieee_article/Test-ieee_article.Rmd +175 -0
- data/examples/latex_templates/Test-ieee_article/Test-ieee_article.pdf +0 -0
- data/examples/latex_templates/Test-ieee_article/mybibfile.bib +20 -0
- data/examples/latex_templates/Test-rjournal_article/RJournal.sty +335 -0
- data/examples/latex_templates/Test-rjournal_article/RJreferences.bib +18 -0
- data/examples/latex_templates/Test-rjournal_article/RJwrapper.pdf +0 -0
- data/examples/latex_templates/Test-rjournal_article/Test-rjournal_article.Rmd +52 -0
- data/examples/latex_templates/Test-springer_article/Test-springer_article.Rmd +65 -0
- data/examples/latex_templates/Test-springer_article/Test-springer_article.pdf +0 -0
- data/examples/latex_templates/Test-springer_article/bibliography.bib +26 -0
- data/examples/latex_templates/Test-springer_article/spbasic.bst +1658 -0
- data/examples/latex_templates/Test-springer_article/spmpsci.bst +1512 -0
- data/examples/latex_templates/Test-springer_article/spphys.bst +1443 -0
- data/examples/latex_templates/Test-springer_article/svglov3.clo +113 -0
- data/examples/latex_templates/Test-springer_article/svjour3.cls +1431 -0
- data/examples/misc/moneyball.rb +1 -1
- data/examples/misc/subsetting.rb +37 -37
- data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd +73 -0
- data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.pdf +0 -0
- data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.Rmd +382 -0
- data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.pdf +0 -0
- data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.Rmd +164 -0
- data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.pdf +0 -0
- data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.Rmd +92 -0
- data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.pdf +0 -0
- data/examples/rmarkdown/svm-rmarkdown-syllabus-example/attend-grade-relationships.csv +482 -0
- data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.Rmd +280 -0
- data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.pdf +0 -0
- data/examples/rmarkdown/svm-xaringan-example/svm-xaringan-example.Rmd +386 -0
- data/lib/R_interface/r.rb +2 -2
- data/lib/R_interface/r_libs.R +6 -1
- data/lib/R_interface/r_methods.rb +12 -2
- data/lib/R_interface/rdata_frame.rb +8 -17
- data/lib/R_interface/rindexed_object.rb +1 -2
- data/lib/R_interface/rlist.rb +1 -0
- data/lib/R_interface/robject.rb +20 -23
- data/lib/R_interface/rpkg.rb +15 -6
- data/lib/R_interface/rsupport.rb +13 -19
- data/lib/R_interface/ruby_extensions.rb +14 -18
- data/lib/R_interface/rvector.rb +0 -12
- data/lib/gknit.rb +2 -0
- data/lib/gknit/draft.rb +105 -0
- data/lib/gknit/knitr_engine.rb +6 -37
- data/lib/util/exec_ruby.rb +22 -84
- data/lib/util/inline_file.rb +7 -3
- data/specs/figures/bg.jpeg +0 -0
- data/specs/figures/bg.png +0 -0
- data/specs/figures/bg.svg +2 -2
- data/specs/figures/dose_len.png +0 -0
- data/specs/figures/no_args.jpeg +0 -0
- data/specs/figures/no_args.png +0 -0
- data/specs/figures/no_args.svg +2 -2
- data/specs/figures/width_height.jpeg +0 -0
- data/specs/figures/width_height.png +0 -0
- data/specs/figures/width_height_units1.jpeg +0 -0
- data/specs/figures/width_height_units1.png +0 -0
- data/specs/figures/width_height_units2.jpeg +0 -0
- data/specs/figures/width_height_units2.png +0 -0
- data/specs/r_dataframe.spec.rb +184 -11
- data/specs/r_list.spec.rb +4 -4
- data/specs/r_list_apply.spec.rb +11 -10
- data/specs/ruby_expression.spec.rb +3 -11
- data/specs/tmp.rb +106 -34
- data/version.rb +1 -1
- metadata +96 -33
- data/bin/gknit_old_r +0 -236
- data/blogs/dev/dev.Rmd +0 -77
- data/blogs/dev/dev.md +0 -87
- data/blogs/dev/dev_files/figure-html/bubble-1.png +0 -0
- data/blogs/dev/dev_files/figure-html/diverging_bar. +0 -0
- data/blogs/dev/dev_files/figure-html/diverging_bar.png +0 -0
- data/blogs/dplyr/dplyr.rb +0 -63
- data/blogs/galaaz_ggplot/galaaz_ggplot.aux +0 -43
- data/blogs/galaaz_ggplot/galaaz_ggplot.log +0 -640
- data/blogs/galaaz_ggplot/galaaz_ggplot.out +0 -10
- data/blogs/galaaz_ggplot/galaaz_ggplot.tex +0 -481
- data/blogs/galaaz_ggplot/midwest.png +0 -0
- data/blogs/galaaz_ggplot/scatter_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot.Rmd_external_figs +0 -662
- data/blogs/ruby_plot/ruby_plot.tex +0 -1077
- data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.svg +0 -57
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.svg +0 -106
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.svg +0 -110
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.svg +0 -174
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.svg +0 -236
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.svg +0 -296
- data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.svg +0 -236
- data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.svg +0 -218
- data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.svg +0 -128
- data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.svg +0 -150
- data/examples/paper/paper.rb +0 -36
data/specs/r_list.spec.rb
CHANGED
@@ -59,7 +59,7 @@ describe R::List do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
#----------------------------------------------------------------------------------------
|
62
|
-
context "When subsetting a list with '
|
62
|
+
context "When subsetting a list with '>>' (starts at 0)" do
|
63
63
|
|
64
64
|
before(:each) do
|
65
65
|
@l = R.list(1, a: 2, b: 3, c: R.list(4, 5, 6))
|
@@ -170,12 +170,12 @@ describe R::List do
|
|
170
170
|
expect(@l[[4]][[1]]).to eq 4
|
171
171
|
end
|
172
172
|
|
173
|
-
it "should subset with [[]] with
|
173
|
+
it "should subset with [[]] with a vector" do
|
174
174
|
# Note that for a list or other recursive object, the index can be a vector
|
175
175
|
# and each element of the vector is applied in turn to the list, the
|
176
176
|
# selected component, the selected component of that component, and so on.
|
177
177
|
# The result is still a single element.
|
178
|
-
expect(@l[[4, 1]]).to eq 4
|
178
|
+
expect(@l[[R.c(4, 1)]]).to eq 4
|
179
179
|
end
|
180
180
|
|
181
181
|
end
|
@@ -230,7 +230,7 @@ describe R::List do
|
|
230
230
|
end
|
231
231
|
|
232
232
|
#----------------------------------------------------------------------------------------
|
233
|
-
context "When
|
233
|
+
context "When assigning to a list subset" do
|
234
234
|
|
235
235
|
before(:each) do
|
236
236
|
@l = R.list(a: 1, b: 2, c: 3, d: R.list(i: 4, j: 5, k: 6))
|
data/specs/r_list_apply.spec.rb
CHANGED
@@ -62,20 +62,20 @@ describe R::List do
|
|
62
62
|
expect(quant.a[1]).to eq R.c('0%': 1.0)
|
63
63
|
expect(quant.a[[1]]).to eq 1.0
|
64
64
|
|
65
|
-
expect(quant.a[[
|
66
|
-
expect(quant.a['50%']).to eq R.c('50%': 5.50)
|
67
|
-
expect(R.all__equal(quant.beta[
|
68
|
-
R.c('100%': 20.08553692),
|
65
|
+
expect(quant.a[['50,00000%']]).to eq 5.50
|
66
|
+
expect(quant.a['50,00000%']).to eq R.c('50,00000%': 5.50)
|
67
|
+
expect(R.all__equal(quant.beta['100,0000%'],
|
68
|
+
R.c('100,0000%': 20.08553692),
|
69
69
|
tolerance: (~:".Machine").double__eps ** 0.5)).to eq true
|
70
70
|
expect(quant.logic[[2]]).to eq 0.0
|
71
71
|
end
|
72
|
-
|
72
|
+
|
73
73
|
it "should allow using method lapply with quantile" do
|
74
74
|
x = R.lapply(@x, @q, R.c(0.25, 0.50, 0.75))
|
75
75
|
expect(x.a[[1]]).to eq 3.25
|
76
|
-
expect(x.a[[
|
77
|
-
expect(R.all__equal(x.beta['75%'],
|
78
|
-
R.c('75%': 5.0536690),
|
76
|
+
expect(x.a[['50,00000%']]).to eq 5.50
|
77
|
+
expect(R.all__equal(x.beta['75,00000%'],
|
78
|
+
R.c('75,00000%': 5.0536690),
|
79
79
|
tolerance: (~:".Machine").double__eps ** 0.5)).to eq true
|
80
80
|
expect(x.logic[[2]]).to eq 0.5
|
81
81
|
end
|
@@ -84,8 +84,9 @@ describe R::List do
|
|
84
84
|
# sapply will return a matrix
|
85
85
|
quant = R.sapply(@x, @q)
|
86
86
|
expect(quant.rclass).to eq 'matrix'
|
87
|
-
|
88
|
-
|
87
|
+
expect(quant[:all, 'a']).to eq R.c('0%': 1, '25,00000%': 3.25,
|
88
|
+
'50,00000%': 5.50, '75,00000%': 7.75,
|
89
|
+
'100,0000%': 10)
|
89
90
|
|
90
91
|
expect(quant[3, 'beta']).to eq 1.0
|
91
92
|
end
|
@@ -22,6 +22,7 @@
|
|
22
22
|
##########################################################################################
|
23
23
|
|
24
24
|
require 'galaaz'
|
25
|
+
require 'ggplot'
|
25
26
|
|
26
27
|
#========================================================================================
|
27
28
|
# class Expression in the R module extends Ruby's symbols, so that they can be used in
|
@@ -288,18 +289,9 @@ describe Symbol do
|
|
288
289
|
|
289
290
|
# df is a Ruby symbol and ToothGrowth is an R dataframe. But at this point
|
290
291
|
# there is no relationship between the two
|
291
|
-
df =
|
292
|
-
|
293
|
-
# we now call a method on a Ruby symbol. This will try to identify if this
|
294
|
-
# method exists in the R dataframe. This is one of the columns of the R
|
295
|
-
# dataframe, so 'dose' is now an R expression
|
292
|
+
df = ~:ToothGrowth
|
296
293
|
dose = df.dose
|
297
|
-
|
298
|
-
|
299
|
-
# dose.assign is an R expression, equivalent to 'ToothGrowth[["dose"]] <-'
|
300
|
-
# an the whole expression becomes:
|
301
|
-
# 'ToothGrowth[["dose"]] <- as.factor(ToothGrowth[["dose"]])'
|
302
|
-
dose.assign dose.as__factor
|
294
|
+
dose = dose.as__factor
|
303
295
|
|
304
296
|
df2 = R.data__frame(
|
305
297
|
R.aggregate(df.len, by: R.list(dose), FUN: :mean),
|
data/specs/tmp.rb
CHANGED
@@ -22,51 +22,123 @@
|
|
22
22
|
##########################################################################################
|
23
23
|
|
24
24
|
require 'galaaz'
|
25
|
-
require '
|
25
|
+
# require 'gknit'
|
26
26
|
|
27
|
-
|
28
|
-
#
|
29
|
-
# puts R.str(mtcars)
|
30
|
-
# shouls allow mtcars[['car name']] = mtcars.rownames
|
27
|
+
describe "error" do
|
28
|
+
# describe R::DataFrame do
|
31
29
|
|
32
|
-
|
33
|
-
mtcars = ~:mtcars
|
30
|
+
context "Bootsraping" do
|
34
31
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
32
|
+
it "should error with R" do
|
33
|
+
vec = R.c(2)
|
34
|
+
puts vec
|
35
|
+
# expect(vec[1]).to eq 2
|
36
|
+
end
|
40
37
|
|
41
|
-
|
38
|
+
=begin
|
39
|
+
it "should error with Ruby" do
|
40
|
+
expect(1).to eq 2
|
41
|
+
end
|
42
|
+
|
43
|
+
before(:each) do
|
44
|
+
R.len = 10
|
45
|
+
R.sd = 20
|
46
|
+
R.vec = R.c(1, 2, 3, 4)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should inline r objects in 'expressions'" do
|
50
|
+
e1 = :len + :sd + 5 + R.c(1, 2, 3, 4)
|
51
|
+
expect(e1.rclass).to eq "integer"
|
52
|
+
expect(e1.eval).to eq R.c(36, 37, 38, 39)
|
53
|
+
# expect(e1.eval).not_to eq R.c(35, 37, 38, 39)
|
54
|
+
end
|
55
|
+
=end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
=begin
|
63
|
+
Polyglot.eval("R", <<-R)
|
64
|
+
library(plotly)
|
65
|
+
m <- highlight_key(mpg)
|
66
|
+
p <- ggplot(m, aes(displ, hwy)) + geom_point()
|
67
|
+
gg <- highlight(ggplotly(p), "plotly_selected")
|
68
|
+
crosstalk::bscols(gg, DT::datatable(m))
|
69
|
+
R
|
70
|
+
=end
|
71
|
+
|
72
|
+
# GKnit.draft(file: "rmd_test.Rmd", template: 'acm_article'))
|
73
|
+
# GKnit.draft(file: "rmd_test.Rmd", template: 'acm_article2', package: 'rticles')
|
74
|
+
# GKnit.draft(file: "rmd_test", template: 'acm_article', package: 'rticles')
|
42
75
|
|
43
|
-
|
76
|
+
## Renaming columns
|
44
77
|
|
45
|
-
|
46
|
-
R.geom_bar(E.aes(fill: :mpg_type), stat: 'identity', width: 0.5) +
|
47
|
-
R.scale_fill_manual(name: 'Mileage',
|
48
|
-
labels: R.c('Above Average', 'Below Average'),
|
49
|
-
values: R.c('above': '#00ba38', 'below': '#f8766d')) +
|
50
|
-
R.labs(subtitle: "Normalised mileage from 'mtcars'",
|
51
|
-
title: "Diverging Bars") +
|
52
|
-
R.coord_flip
|
78
|
+
#The rename function is used to rename columns
|
53
79
|
|
54
|
-
|
80
|
+
#```{ruby rename}
|
81
|
+
#puts @flights.rename(dep_time: 'deptime').head.as__data__frame
|
82
|
+
#```
|
55
83
|
|
84
|
+
# puts File.directory?(".")
|
56
85
|
|
86
|
+
#===========================================================
|
57
87
|
=begin
|
88
|
+
# Add NULL to an element of the list
|
89
|
+
# Not implemented yet. Need to assing the
|
90
|
+
# list(NULL) element.
|
91
|
+
R::Support.eval(<<-R)
|
92
|
+
y <- list(a = 1, b = 2)
|
93
|
+
y["b"] <- list(NULL)
|
94
|
+
str(y)
|
95
|
+
|
96
|
+
print(list(NULL))
|
97
|
+
R
|
98
|
+
=end
|
99
|
+
|
58
100
|
|
59
|
-
|
101
|
+
=begin
|
102
|
+
Polyglot.eval("R", <<-R)
|
103
|
+
fidx = function(idx) {
|
104
|
+
print(typeof(idx))
|
105
|
+
print(class(idx))
|
106
|
+
print(idx)
|
107
|
+
print(is_missing(idx))
|
108
|
+
}
|
60
109
|
|
61
|
-
|
62
|
-
|
110
|
+
ma = missing_arg()
|
111
|
+
f = fidx
|
112
|
+
params = list()
|
113
|
+
params = `[[<-`(params, 1, ma)
|
114
|
+
invoke(f, params)
|
63
115
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
values = c("above"="#00ba38", "below"="#f8766d")) +
|
69
|
-
labs(subtitle="Normalised mileage from 'mtcars'",
|
70
|
-
title= "Diverging Bars") +
|
71
|
-
coord_flip()
|
116
|
+
print("======")
|
117
|
+
fidx(ma)
|
118
|
+
|
119
|
+
R
|
72
120
|
=end
|
121
|
+
|
122
|
+
=begin
|
123
|
+
ma = Polyglot.eval("R", "missing_arg()")
|
124
|
+
|
125
|
+
puts "======"
|
126
|
+
|
127
|
+
f = Polyglot.eval("R", "fidx")
|
128
|
+
params = Polyglot.eval("R", "list()")
|
129
|
+
params = Polyglot.eval("R", "`[[<-`").call(params, 1, ma)
|
130
|
+
Polyglot.eval("R", "invoke").call(f, params)
|
131
|
+
|
132
|
+
puts "======"
|
133
|
+
|
134
|
+
Polyglot.eval("R", "fidx").call(ma)
|
135
|
+
=end
|
136
|
+
|
137
|
+
# Polyglot.eval("R", "print").call(pl)
|
138
|
+
# ma2 = Polyglot.eval("R", "`[[`").call(pl, 1)
|
139
|
+
# Polyglot.eval("R", "fidx").call(ma2)
|
140
|
+
|
141
|
+
#R.fidx(ma)
|
142
|
+
|
143
|
+
# R.fidx(Polyglot.eval("R", "missing_arg()"))
|
144
|
+
# R.fidx(R.empty_symbol)
|
data/version.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
$gem_name = "galaaz"
|
2
|
-
$version="0.
|
2
|
+
$version="0.5.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: galaaz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Botafogo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -72,6 +72,7 @@ executables:
|
|
72
72
|
- gstudio
|
73
73
|
- gknit
|
74
74
|
- grun
|
75
|
+
- gknit-draft
|
75
76
|
extensions: []
|
76
77
|
extra_rdoc_files: []
|
77
78
|
files:
|
@@ -80,62 +81,68 @@ files:
|
|
80
81
|
- Rakefile
|
81
82
|
- bin/galaaz
|
82
83
|
- bin/gknit
|
83
|
-
- bin/
|
84
|
+
- bin/gknit-draft
|
85
|
+
- bin/gknit-draft.rb
|
86
|
+
- bin/gknit_Rscript
|
84
87
|
- bin/grun
|
85
88
|
- bin/gstudio
|
86
|
-
- bin/
|
87
|
-
-
|
88
|
-
- blogs/dev/dev.html
|
89
|
-
- blogs/dev/dev.md
|
90
|
-
- blogs/dev/dev_files/figure-html/bubble-1.png
|
91
|
-
- blogs/dev/dev_files/figure-html/diverging_bar.
|
92
|
-
- blogs/dev/dev_files/figure-html/diverging_bar.png
|
93
|
-
- blogs/dev/model.rb
|
94
|
-
- blogs/dplyr/dplyr.rb
|
89
|
+
- bin/gstudio_irb.rb
|
90
|
+
- bin/gstudio_pry.rb
|
95
91
|
- blogs/galaaz_ggplot/galaaz_ggplot.Rmd
|
96
|
-
- blogs/galaaz_ggplot/galaaz_ggplot.aux
|
97
92
|
- blogs/galaaz_ggplot/galaaz_ggplot.html
|
98
|
-
- blogs/galaaz_ggplot/galaaz_ggplot.log
|
99
93
|
- blogs/galaaz_ggplot/galaaz_ggplot.md
|
100
|
-
- blogs/galaaz_ggplot/galaaz_ggplot.out
|
101
94
|
- blogs/galaaz_ggplot/galaaz_ggplot.pdf
|
102
|
-
- blogs/galaaz_ggplot/
|
95
|
+
- blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png
|
96
|
+
- blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png
|
103
97
|
- blogs/galaaz_ggplot/midwest.Rmd
|
104
98
|
- blogs/galaaz_ggplot/midwest.html
|
105
|
-
- blogs/galaaz_ggplot/midwest.png
|
106
99
|
- blogs/galaaz_ggplot/midwest_external_png
|
107
|
-
- blogs/galaaz_ggplot/scatter_plot.png
|
108
100
|
- blogs/gknit/gknit.Rmd
|
101
|
+
- blogs/gknit/gknit.html
|
102
|
+
- blogs/gknit/gknit.pdf
|
103
|
+
- blogs/gknit/lst.rds
|
109
104
|
- blogs/gknit/model.rb
|
105
|
+
- blogs/gknit/stats.bib
|
106
|
+
- blogs/manual/lst.rds
|
110
107
|
- blogs/manual/manual.Rmd
|
111
108
|
- blogs/manual/manual.html
|
112
109
|
- blogs/manual/manual.md
|
110
|
+
- blogs/manual/manual.pdf
|
111
|
+
- blogs/manual/manual.tex
|
112
|
+
- blogs/manual/manual_files/figure-html/bubble-1.png
|
113
113
|
- blogs/manual/manual_files/figure-html/diverging_bar.png
|
114
|
+
- blogs/manual/manual_files/figure-latex/bubble-1.png
|
115
|
+
- blogs/manual/manual_files/figure-latex/diverging_bar.pdf
|
116
|
+
- blogs/manual/model.rb
|
117
|
+
- blogs/nse_dplyr/nse_dplyr.Rmd
|
118
|
+
- blogs/nse_dplyr/nse_dplyr.html
|
119
|
+
- blogs/nse_dplyr/nse_dplyr.md
|
120
|
+
- blogs/nse_dplyr/nse_dplyr.pdf
|
114
121
|
- blogs/oh_my/not_so.rb
|
115
122
|
- blogs/oh_my/oh_my.Rmd
|
116
123
|
- blogs/oh_my/oh_my.html
|
117
124
|
- blogs/oh_my/oh_my.md
|
118
125
|
- blogs/oh_my/old.Rmd
|
119
126
|
- blogs/ruby_plot/ruby_plot.Rmd
|
120
|
-
- blogs/ruby_plot/ruby_plot.Rmd_external_figs
|
121
127
|
- blogs/ruby_plot/ruby_plot.html
|
122
128
|
- blogs/ruby_plot/ruby_plot.md
|
123
129
|
- blogs/ruby_plot/ruby_plot.pdf
|
124
|
-
- blogs/ruby_plot/
|
125
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/
|
126
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/
|
127
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/
|
128
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/
|
129
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.svg
|
130
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png
|
131
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png
|
132
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png
|
133
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png
|
134
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png
|
130
135
|
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png
|
131
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.
|
132
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.
|
133
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.
|
134
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.
|
135
|
-
- blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.
|
136
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png
|
137
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png
|
138
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png
|
139
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png
|
140
|
+
- blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png
|
136
141
|
- examples/50Plots_MasterList/Images/midwest-scatterplot.PNG
|
137
142
|
- examples/50Plots_MasterList/ScatterPlot.rb
|
138
143
|
- examples/50Plots_MasterList/scatter_plot.rb
|
144
|
+
- examples/Bibliography/master.bib
|
145
|
+
- examples/Bibliography/stats.bib
|
139
146
|
- examples/R/calc.R
|
140
147
|
- examples/R/java_interop.R
|
141
148
|
- examples/islr/all.rb
|
@@ -145,11 +152,67 @@ files:
|
|
145
152
|
- examples/islr/ch3_multiple_regression.rb
|
146
153
|
- examples/islr/ch6.spec.rb
|
147
154
|
- examples/islr/x_y_rnorm.jpg
|
155
|
+
- examples/latex_templates/Test-acm_article/Makefile
|
156
|
+
- examples/latex_templates/Test-acm_article/Test-acm_article.Rmd
|
157
|
+
- examples/latex_templates/Test-acm_article/acm_proc_article-sp.cls
|
158
|
+
- examples/latex_templates/Test-acm_article/sensys-abstract.cls
|
159
|
+
- examples/latex_templates/Test-acm_article/sigproc.bib
|
160
|
+
- examples/latex_templates/Test-acs_article/Test-acs_article.Rmd
|
161
|
+
- examples/latex_templates/Test-acs_article/Test-acs_article.pdf
|
162
|
+
- examples/latex_templates/Test-acs_article/acs-Test-acs_article.bib
|
163
|
+
- examples/latex_templates/Test-acs_article/acs-my_output.bib
|
164
|
+
- examples/latex_templates/Test-acs_article/acstest.bib
|
165
|
+
- examples/latex_templates/Test-aea_article/AEA.cls
|
166
|
+
- examples/latex_templates/Test-aea_article/BibFile.bib
|
167
|
+
- examples/latex_templates/Test-aea_article/Test-aea_article.Rmd
|
168
|
+
- examples/latex_templates/Test-aea_article/Test-aea_article.pdf
|
169
|
+
- examples/latex_templates/Test-aea_article/aea.bst
|
170
|
+
- examples/latex_templates/Test-aea_article/multicol.sty
|
171
|
+
- examples/latex_templates/Test-aea_article/references.bib
|
172
|
+
- examples/latex_templates/Test-aea_article/setspace.sty
|
173
|
+
- examples/latex_templates/Test-amq_article/Test-amq_article.Rmd
|
174
|
+
- examples/latex_templates/Test-amq_article/Test-amq_article.pdf
|
175
|
+
- examples/latex_templates/Test-amq_article/Test-amq_article.pdfsync
|
176
|
+
- examples/latex_templates/Test-amq_article/pics/Figure2.pdf
|
177
|
+
- examples/latex_templates/Test-ams_article/Test-ams_article.Rmd
|
178
|
+
- examples/latex_templates/Test-ams_article/amstest.bib
|
179
|
+
- examples/latex_templates/Test-asa_article/Test-asa_article.Rmd
|
180
|
+
- examples/latex_templates/Test-asa_article/Test-asa_article.pdf
|
181
|
+
- examples/latex_templates/Test-asa_article/agsm.bst
|
182
|
+
- examples/latex_templates/Test-asa_article/bibliography.bib
|
183
|
+
- examples/latex_templates/Test-ieee_article/IEEEtran.bst
|
184
|
+
- examples/latex_templates/Test-ieee_article/IEEEtran.cls
|
185
|
+
- examples/latex_templates/Test-ieee_article/Test-ieee_article.Rmd
|
186
|
+
- examples/latex_templates/Test-ieee_article/Test-ieee_article.pdf
|
187
|
+
- examples/latex_templates/Test-ieee_article/mybibfile.bib
|
188
|
+
- examples/latex_templates/Test-rjournal_article/RJournal.sty
|
189
|
+
- examples/latex_templates/Test-rjournal_article/RJreferences.bib
|
190
|
+
- examples/latex_templates/Test-rjournal_article/RJwrapper.pdf
|
191
|
+
- examples/latex_templates/Test-rjournal_article/Test-rjournal_article.Rmd
|
192
|
+
- examples/latex_templates/Test-springer_article/Test-springer_article.Rmd
|
193
|
+
- examples/latex_templates/Test-springer_article/Test-springer_article.pdf
|
194
|
+
- examples/latex_templates/Test-springer_article/bibliography.bib
|
195
|
+
- examples/latex_templates/Test-springer_article/spbasic.bst
|
196
|
+
- examples/latex_templates/Test-springer_article/spmpsci.bst
|
197
|
+
- examples/latex_templates/Test-springer_article/spphys.bst
|
198
|
+
- examples/latex_templates/Test-springer_article/svglov3.clo
|
199
|
+
- examples/latex_templates/Test-springer_article/svjour3.cls
|
148
200
|
- examples/misc/baseball.csv
|
149
201
|
- examples/misc/ggplot.rb
|
150
202
|
- examples/misc/moneyball.rb
|
151
203
|
- examples/misc/subsetting.rb
|
152
|
-
- examples/
|
204
|
+
- examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd
|
205
|
+
- examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.pdf
|
206
|
+
- examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.Rmd
|
207
|
+
- examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.pdf
|
208
|
+
- examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.Rmd
|
209
|
+
- examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.pdf
|
210
|
+
- examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.Rmd
|
211
|
+
- examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.pdf
|
212
|
+
- examples/rmarkdown/svm-rmarkdown-syllabus-example/attend-grade-relationships.csv
|
213
|
+
- examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.Rmd
|
214
|
+
- examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.pdf
|
215
|
+
- examples/rmarkdown/svm-xaringan-example/svm-xaringan-example.Rmd
|
153
216
|
- examples/sthda_ggplot/README.md
|
154
217
|
- examples/sthda_ggplot/all.rb
|
155
218
|
- examples/sthda_ggplot/one_variable_continuous/density_gg.rb
|
@@ -206,6 +269,7 @@ files:
|
|
206
269
|
- lib/R_interface/rvector.rb
|
207
270
|
- lib/galaaz.rb
|
208
271
|
- lib/gknit.rb
|
272
|
+
- lib/gknit/draft.rb
|
209
273
|
- lib/gknit/include_engine.rb
|
210
274
|
- lib/gknit/knitr_engine.rb
|
211
275
|
- lib/gknit/rb_engine.rb
|
@@ -269,8 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
333
|
- !ruby/object:Gem::Version
|
270
334
|
version: '0'
|
271
335
|
requirements: []
|
272
|
-
|
273
|
-
rubygems_version: 2.6.14.1
|
336
|
+
rubygems_version: 3.0.3
|
274
337
|
signing_key:
|
275
338
|
specification_version: 4
|
276
339
|
summary: Tightly coupling Ruby and R
|