galaaz 0.4.10 → 2.0.0

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.
Files changed (391) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/LICENSE +0 -0
  4. data/README.md +3123 -882
  5. data/Rakefile +62 -41
  6. data/bin/galaaz-bootstrap +137 -0
  7. data/bin/galaaz-jruby +14 -0
  8. data/bin/galaaz_jruby_env.inc.sh +6 -0
  9. data/bin/gbookdown +64 -0
  10. data/bin/gknit +223 -6
  11. data/bin/gknit-draft +105 -0
  12. data/bin/gknit-draft.rb +28 -0
  13. data/bin/gknit_Rscript +127 -0
  14. data/bin/grun +27 -1
  15. data/bin/gstudio +49 -4
  16. data/bin/{gstudio.rb → gstudio_irb.rb} +0 -0
  17. data/bin/gstudio_pry.rb +7 -0
  18. data/bin/install-tinytex +6 -0
  19. data/bin/run_all_rspec +43 -0
  20. data/bin/run_example +14 -0
  21. data/bin/run_old_rspec +19 -0
  22. data/bin/run_rspec +23 -0
  23. data/bin/run_rspec_subset +38 -0
  24. data/bin/run_slow_rspec +19 -0
  25. data/blogs/R-on-Rails-Planning-Document.md +940 -0
  26. data/blogs/README.md +100 -0
  27. data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +38 -66
  28. data/blogs/galaaz_ggplot/galaaz_ggplot.log +754 -0
  29. data/blogs/galaaz_ggplot/galaaz_ggplot.md +364 -0
  30. data/blogs/galaaz_ggplot/galaaz_ggplot.tex +607 -0
  31. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png +0 -0
  32. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png +0 -0
  33. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/midwest_rb.png +0 -0
  34. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/scatter_plot_rb.png +0 -0
  35. data/blogs/galaaz_ggplot/midwest.Rmd +3 -3
  36. data/blogs/galaaz_ggplot/midwest_external_png +0 -0
  37. data/blogs/gknit/gknit.Rmd +52 -55
  38. data/blogs/gknit/gknit.md +94 -94
  39. data/blogs/gknit/gknit_files/figure-html/bubble-1.png +0 -0
  40. data/blogs/gknit/gknit_files/figure-html/diverging_bar.png +0 -0
  41. data/blogs/gknit/lst.rds +0 -0
  42. data/blogs/gknit/model.rb +1 -1
  43. data/blogs/gknit/stats.bib +0 -0
  44. data/blogs/manual/include_model_local_repro.Rmd +14 -0
  45. data/blogs/manual/include_model_local_repro.md +75 -0
  46. data/blogs/manual/lst.rds +0 -0
  47. data/blogs/manual/manual.Rmd +1582 -196
  48. data/blogs/manual/manual.log +1786 -0
  49. data/blogs/manual/manual.md +3107 -890
  50. data/blogs/manual/manual.tex +3018 -1086
  51. data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
  52. data/blogs/manual/manual_files/figure-html/diverging_bar.png +0 -0
  53. data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
  54. data/blogs/manual/model.rb +41 -0
  55. data/blogs/nse_dplyr/nse_dplyr.Rmd +277 -151
  56. data/blogs/nse_dplyr/nse_dplyr.log +928 -0
  57. data/blogs/nse_dplyr/nse_dplyr.md +457 -293
  58. data/blogs/oh_my/not_so.rb +0 -0
  59. data/blogs/oh_my/oh_my.Rmd +1234 -25
  60. data/blogs/oh_my/oh_my.log +804 -0
  61. data/blogs/oh_my/oh_my.md +1808 -228
  62. data/blogs/oh_my/oh_my.tex +821 -0
  63. data/blogs/oh_my/old.Rmd +15 -14
  64. data/blogs/ruby_plot/ruby_plot.Rmd +58 -82
  65. data/blogs/ruby_plot/ruby_plot.log +885 -0
  66. data/blogs/ruby_plot/ruby_plot.md +71 -103
  67. data/blogs/ruby_plot/ruby_plot.tex +940 -0
  68. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png +0 -0
  69. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png +0 -0
  70. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png +0 -0
  71. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png +0 -0
  72. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png +0 -0
  73. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png +0 -0
  74. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png +0 -0
  75. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png +0 -0
  76. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png +0 -0
  77. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png +0 -0
  78. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png +0 -0
  79. data/blogs/ruby_plot/ruby_plot_files/figure-latex/dose_len.png +0 -0
  80. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
  81. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
  82. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
  83. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
  84. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
  85. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
  86. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
  87. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
  88. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
  89. data/blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
  90. data/blogs/test/test.Rmd +14 -0
  91. data/examples/50Plots_MasterList/Images/midwest-scatterplot.PNG +0 -0
  92. data/examples/50Plots_MasterList/ScatterPlot.rb +0 -0
  93. data/examples/50Plots_MasterList/scatter_plot.rb +0 -0
  94. data/examples/Bibliography/master.bib +50 -0
  95. data/examples/Bibliography/stats.bib +72 -0
  96. data/examples/R/calc.R +0 -0
  97. data/examples/R/java_interop.R +0 -0
  98. data/examples/bioconductor_deseq2_airway/Documentation/DESeq2-airway-walkthrough.md +56 -0
  99. data/examples/bioconductor_deseq2_airway/bench_galaaz_three_same_process.rb +53 -0
  100. data/examples/bioconductor_deseq2_airway/bench_r_three_same_process.R +34 -0
  101. data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz.rb +33 -0
  102. data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz_optimized.rb +34 -0
  103. data/examples/bioconductor_deseq2_airway/deseq2_airway_minimal.R +30 -0
  104. data/examples/bioconductor_deseq2_airway/deseq2_airway_pipeline_for_bench.R +36 -0
  105. data/examples/islr/all.rb +13 -0
  106. data/examples/islr/ch2.spec.rb +37 -7
  107. data/examples/islr/ch3.spec.rb +11 -2
  108. data/examples/islr/ch3_boston.rb +27 -0
  109. data/examples/islr/ch3_multiple_regression.rb +0 -0
  110. data/examples/islr/ch6.spec.rb +24 -1
  111. data/examples/islr/x_y_rnorm.jpg +0 -0
  112. data/examples/latex_templates/Test-acm_article/Makefile +16 -0
  113. data/examples/latex_templates/Test-acm_article/Test-acm_article.Rmd +65 -0
  114. data/examples/latex_templates/Test-acm_article/acm_proc_article-sp.cls +1670 -0
  115. data/examples/latex_templates/Test-acm_article/sensys-abstract.cls +703 -0
  116. data/examples/latex_templates/Test-acm_article/sigproc.bib +59 -0
  117. data/examples/latex_templates/Test-acs_article/Test-acs_article.Rmd +260 -0
  118. data/examples/latex_templates/Test-acs_article/acs-Test-acs_article.bib +11 -0
  119. data/examples/latex_templates/Test-acs_article/acs-my_output.bib +11 -0
  120. data/examples/latex_templates/Test-acs_article/acstest.bib +17 -0
  121. data/examples/latex_templates/Test-aea_article/AEA.cls +1414 -0
  122. data/{blogs/gknit/marshal.dump → examples/latex_templates/Test-aea_article/BibFile.bib} +0 -0
  123. data/examples/latex_templates/Test-aea_article/Test-aea_article.Rmd +108 -0
  124. data/examples/latex_templates/Test-aea_article/aea.bst +1269 -0
  125. data/examples/latex_templates/Test-aea_article/multicol.sty +853 -0
  126. data/examples/latex_templates/Test-aea_article/references.bib +0 -0
  127. data/examples/latex_templates/Test-aea_article/setspace.sty +546 -0
  128. data/examples/latex_templates/Test-amq_article/Test-amq_article.Rmd +256 -0
  129. data/examples/latex_templates/Test-amq_article/Test-amq_article.pdfsync +3397 -0
  130. data/examples/latex_templates/Test-ams_article/Test-ams_article.Rmd +215 -0
  131. data/examples/latex_templates/Test-ams_article/amstest.bib +436 -0
  132. data/examples/latex_templates/Test-asa_article/Test-asa_article.Rmd +153 -0
  133. data/examples/latex_templates/Test-asa_article/agsm.bst +1353 -0
  134. data/examples/latex_templates/Test-asa_article/bibliography.bib +233 -0
  135. data/examples/latex_templates/Test-ieee_article/IEEEtran.bst +2409 -0
  136. data/examples/latex_templates/Test-ieee_article/IEEEtran.cls +6346 -0
  137. data/examples/latex_templates/Test-ieee_article/Test-ieee_article.Rmd +175 -0
  138. data/examples/latex_templates/Test-ieee_article/mybibfile.bib +20 -0
  139. data/examples/latex_templates/Test-rjournal_article/RJournal.sty +335 -0
  140. data/examples/latex_templates/Test-rjournal_article/RJreferences.bib +18 -0
  141. data/examples/latex_templates/Test-rjournal_article/Test-rjournal_article.Rmd +52 -0
  142. data/examples/latex_templates/Test-springer_article/Test-springer_article.Rmd +65 -0
  143. data/examples/latex_templates/Test-springer_article/bibliography.bib +26 -0
  144. data/examples/latex_templates/Test-springer_article/spbasic.bst +1658 -0
  145. data/examples/latex_templates/Test-springer_article/spmpsci.bst +1512 -0
  146. data/examples/latex_templates/Test-springer_article/spphys.bst +1443 -0
  147. data/examples/latex_templates/Test-springer_article/svglov3.clo +113 -0
  148. data/examples/latex_templates/Test-springer_article/svjour3.cls +1431 -0
  149. data/examples/misc/baseball.csv +0 -0
  150. data/examples/misc/ggplot.rb +3 -2
  151. data/examples/misc/moneyball.rb +0 -0
  152. data/examples/misc/subsetting.rb +0 -0
  153. data/examples/multithread_shards_to_r/shards_to_r.rb +67 -0
  154. data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd +73 -0
  155. data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.Rmd +382 -0
  156. data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.Rmd +164 -0
  157. data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.Rmd +92 -0
  158. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/attend-grade-relationships.csv +482 -0
  159. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.Rmd +280 -0
  160. data/examples/rmarkdown/svm-xaringan-example/svm-xaringan-example.Rmd +386 -0
  161. data/examples/sthda_ggplot/README.md +0 -0
  162. data/examples/sthda_ggplot/RUN.md +41 -0
  163. data/examples/sthda_ggplot/all.rb +0 -0
  164. data/examples/sthda_ggplot/one_variable_continuous/density_gg.rb +0 -0
  165. data/examples/sthda_ggplot/one_variable_continuous/geom_area.rb +0 -0
  166. data/examples/sthda_ggplot/one_variable_continuous/geom_density.rb +2 -0
  167. data/examples/sthda_ggplot/one_variable_continuous/geom_dotplot.rb +0 -0
  168. data/examples/sthda_ggplot/one_variable_continuous/geom_freqpoly.rb +0 -0
  169. data/examples/sthda_ggplot/one_variable_continuous/geom_histogram.rb +0 -0
  170. data/examples/sthda_ggplot/one_variable_continuous/histogram_density.rb +0 -0
  171. data/examples/sthda_ggplot/one_variable_continuous/stat.rb +0 -0
  172. data/examples/sthda_ggplot/one_variable_discrete/bar.rb +0 -0
  173. data/examples/sthda_ggplot/qplots/box_violin_dot.rb +0 -0
  174. data/examples/sthda_ggplot/qplots/scatter_plots.rb +0 -0
  175. data/examples/sthda_ggplot/scatter_gg.rb +0 -0
  176. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_bin2d.rb +0 -0
  177. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_density2d.rb +0 -0
  178. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_hex.rb +0 -0
  179. data/examples/sthda_ggplot/two_variables_cont_cont/geom_point.rb +0 -0
  180. data/examples/sthda_ggplot/two_variables_cont_cont/geom_smooth.rb +0 -0
  181. data/examples/sthda_ggplot/two_variables_cont_cont/misc.rb +0 -0
  182. data/examples/sthda_ggplot/two_variables_cont_function/geom_area.rb +4 -3
  183. data/examples/sthda_ggplot/two_variables_disc_cont/geom_bar.rb +0 -0
  184. data/examples/sthda_ggplot/two_variables_disc_cont/geom_boxplot.rb +0 -0
  185. data/examples/sthda_ggplot/two_variables_disc_cont/geom_dotplot.rb +0 -0
  186. data/examples/sthda_ggplot/two_variables_disc_cont/geom_jitter.rb +0 -0
  187. data/examples/sthda_ggplot/two_variables_disc_cont/geom_line.rb +0 -0
  188. data/examples/sthda_ggplot/two_variables_disc_cont/geom_violin.rb +0 -0
  189. data/examples/sthda_ggplot/two_variables_disc_disc/geom_jitter.rb +0 -0
  190. data/examples/sthda_ggplot/two_variables_error/geom_crossbar.rb +0 -0
  191. data/ext/new_bridge/Makefile +46 -0
  192. data/ext/new_bridge/galaaz_gatekeeper_phase0.cpp +12 -0
  193. data/ext/new_bridge/galaaz_gatekeeper_phase1.cpp +1639 -0
  194. data/lib/R_interface/galaaz_device.R +20 -0
  195. data/lib/R_interface/include_engine.R +109 -0
  196. data/lib/R_interface/new_bridge_adapter.rb +824 -0
  197. data/lib/R_interface/r.rb +177 -25
  198. data/lib/R_interface/r_arrow.rb +113 -0
  199. data/lib/R_interface/r_libs.R +4 -4
  200. data/lib/R_interface/r_methods.rb +13 -116
  201. data/lib/R_interface/r_module_s.rb +0 -0
  202. data/lib/R_interface/rbinary_operators.rb +20 -2
  203. data/lib/R_interface/rclosure.rb +5 -1
  204. data/lib/R_interface/rdata_frame.rb +34 -70
  205. data/lib/R_interface/rdevice.rb +125 -0
  206. data/lib/R_interface/rdevices.R +0 -0
  207. data/lib/R_interface/renvironment.rb +10 -4
  208. data/lib/R_interface/rexpression.rb +5 -1
  209. data/lib/R_interface/rindexed_object.rb +41 -13
  210. data/lib/R_interface/rlanguage.rb +20 -62
  211. data/lib/R_interface/rlist.rb +115 -25
  212. data/lib/R_interface/rlogical_operators.rb +0 -0
  213. data/lib/R_interface/rmatrix.rb +2 -11
  214. data/lib/R_interface/rmd_indexed_object.rb +5 -1
  215. data/lib/R_interface/robject.rb +348 -290
  216. data/lib/R_interface/rpkg.rb +1 -0
  217. data/lib/R_interface/rsupport.rb +610 -331
  218. data/lib/R_interface/rsupport_scope.rb +2 -1
  219. data/lib/R_interface/rsymbol.rb +50 -0
  220. data/lib/R_interface/ruby_callback.rb +2 -3
  221. data/lib/R_interface/ruby_extensions.rb +225 -175
  222. data/lib/R_interface/runary_operators.rb +0 -0
  223. data/lib/R_interface/rvector.rb +147 -31
  224. data/lib/galaaz.rb +0 -0
  225. data/lib/galaaz_jruby.rb +22 -0
  226. data/lib/gknit/diagnostics.rb +50 -0
  227. data/lib/gknit/draft.rb +111 -0
  228. data/lib/gknit/include_engine.rb +15 -7
  229. data/lib/gknit/knitr_engine.rb +223 -107
  230. data/lib/gknit/rb_engine.rb +3 -3
  231. data/lib/gknit/ruby_engine.rb +0 -0
  232. data/lib/gknit.rb +3 -0
  233. data/lib/new_bridge/bootstrap/windows_bootstrap.rb +285 -0
  234. data/lib/new_bridge/envelope.rb +51 -0
  235. data/lib/new_bridge/eval_result.rb +26 -0
  236. data/lib/new_bridge/framing.rb +39 -0
  237. data/lib/new_bridge/instance_pool_client.rb +38 -0
  238. data/lib/new_bridge/r_instance_manager.rb +404 -0
  239. data/lib/new_bridge/session_client.rb +530 -0
  240. data/lib/new_bridge/tcp_framed.rb +44 -0
  241. data/lib/new_bridge.rb +9 -0
  242. data/lib/util/exec_ruby.rb +95 -46
  243. data/lib/util/inline_file.rb +35 -30
  244. data/new_bridge_specs/benchmark_phase5_5_unboxing_spec.rb +96 -0
  245. data/new_bridge_specs/eval_r_async_spec.rb +113 -0
  246. data/new_bridge_specs/integration_phase5_1_concurrent_spec.rb +50 -0
  247. data/new_bridge_specs/integration_phase5_1_eval_spec.rb +16 -0
  248. data/new_bridge_specs/integration_phase5_1_r_api_spec.rb +25 -0
  249. data/new_bridge_specs/integration_phase5_1_smoke_spec.rb +31 -0
  250. data/new_bridge_specs/integration_phase5_2_dataframe_unboxing_spec.rb +19 -0
  251. data/new_bridge_specs/integration_phase5_2_handle_eval_unboxing_spec.rb +25 -0
  252. data/new_bridge_specs/integration_phase5_3_callback_args_spec.rb +28 -0
  253. data/new_bridge_specs/integration_phase5_3_callback_error_spec.rb +22 -0
  254. data/new_bridge_specs/integration_phase5_3_callback_timeout_spec.rb +28 -0
  255. data/new_bridge_specs/integration_phase5_3_callbacks_smoke_spec.rb +22 -0
  256. data/new_bridge_specs/integration_phase5_3_edge_cases_spec.rb +52 -0
  257. data/new_bridge_specs/integration_phase5_3_nested_spec.rb +30 -0
  258. data/new_bridge_specs/integration_phase5_4_concurrent_sessions_spec.rb +53 -0
  259. data/new_bridge_specs/integration_phase5_4_nested_session_callbacks_spec.rb +49 -0
  260. data/new_bridge_specs/integration_phase5_4_session_routing_spec.rb +38 -0
  261. data/new_bridge_specs/integration_phase5_5_stress_concurrency_spec.rb +52 -0
  262. data/new_bridge_specs/integration_phase5_5_unbox_walk_spec.rb +46 -0
  263. data/new_bridge_specs/phase0_protocol_spec.rb +96 -0
  264. data/new_bridge_specs/phase1_req_ret_spec.rb +66 -0
  265. data/new_bridge_specs/phase2_multi_instance_spec.rb +67 -0
  266. data/new_bridge_specs/phase3_callbacks_spec.rb +71 -0
  267. data/new_bridge_specs/phase4_2_hardening_spec.rb +252 -0
  268. data/new_bridge_specs/phase4_3_r_instance_manager_spec.rb +85 -0
  269. data/new_bridge_specs/phase4_nested_callbacks_spec.rb +123 -0
  270. data/r_requires/ggplot.rb +0 -0
  271. data/r_requires/knitr.rb +0 -0
  272. data/specs/all.rb +15 -11
  273. data/specs/arrow_from_ruby_batches_spec.rb +50 -0
  274. data/specs/arrow_semantics_spec.rb +64 -0
  275. data/specs/bridge_concurrent_spec.rb +46 -0
  276. data/specs/bridge_nested_spec.rb +25 -0
  277. data/specs/dataframe_semantics_spec.rb +122 -0
  278. data/specs/dataframe_single_index_logical_filter_spec.rb +21 -0
  279. data/specs/dispatch_probe_cache_spec.rb +38 -0
  280. data/specs/dispatch_probe_error_class_fallback_spec.rb +20 -0
  281. data/specs/dispatch_probe_fallback_spec.rb +18 -0
  282. data/specs/environment_semantics_spec.rb +89 -0
  283. data/specs/field_access_spec.rb +31 -0
  284. data/specs/figures/bg.jpeg +0 -0
  285. data/specs/figures/bg.png +0 -0
  286. data/specs/figures/bg.svg +168 -57
  287. data/specs/figures/dose_len.png +0 -0
  288. data/specs/figures/no_args.jpeg +0 -0
  289. data/specs/figures/no_args.png +0 -0
  290. data/specs/figures/no_args.svg +168 -57
  291. data/specs/figures/width_height.jpeg +0 -0
  292. data/specs/figures/width_height.png +0 -0
  293. data/specs/figures/width_height_units1.jpeg +0 -0
  294. data/specs/figures/width_height_units1.png +0 -0
  295. data/specs/figures/width_height_units2.jpeg +0 -0
  296. data/specs/figures/width_height_units2.png +0 -0
  297. data/specs/formula_semantics_spec.rb +81 -0
  298. data/specs/galaaz_util_exec_ruby_spec.rb +85 -0
  299. data/specs/galaaz_util_inline_file_spec.rb +54 -0
  300. data/specs/gknit_cli_option_permutation_spec.rb +24 -0
  301. data/specs/gknit_include_engine_spec.rb +72 -0
  302. data/specs/gknit_install_timeout_report_spec.rb +69 -0
  303. data/specs/gknit_internal_error_report_spec.rb +57 -0
  304. data/specs/gknit_vector_map_output_spec.rb +59 -0
  305. data/specs/globalenv_guardrail_spec.rb +52 -0
  306. data/specs/language_expression_semantics_spec.rb +145 -0
  307. data/specs/list_semantics_spec.rb +111 -0
  308. data/specs/new_bridge_bulk_dataframe_transfer_spec.rb +44 -0
  309. data/specs/new_bridge_bulk_vector_transfer_spec.rb +73 -0
  310. data/specs/new_bridge_callback_timeout_spec.rb +69 -0
  311. data/specs/new_bridge_eval_r_fallback_spec.rb +55 -0
  312. data/specs/nil_null_spec.rb +42 -0
  313. data/specs/object_build_phase2_spec.rb +53 -0
  314. data/specs/phase1_callback_bridge_spec.rb +84 -0
  315. data/specs/phase2_gknit_generic_rendering_guardrail_spec.rb +46 -0
  316. data/specs/phase2_gknit_no_raw_code_leakage_spec.rb +43 -0
  317. data/specs/phase3_gknit_generic_graphics_capture_spec.rb +71 -0
  318. data/specs/plot_device_semantics_spec.rb +28 -0
  319. data/specs/plot_snapshot_semantics_spec.rb +58 -0
  320. data/specs/protocol_result_spec.rb +236 -0
  321. data/specs/r_batch_fail_fast_spec.rb +47 -0
  322. data/specs/r_bridge_bootstrap_spec.rb +11 -0
  323. data/specs/r_devices.spec.rb +1 -1
  324. data/specs/r_eval.spec.rb +16 -18
  325. data/specs/r_function.spec.rb +1 -1
  326. data/specs/r_instance_manager_spec.rb +285 -0
  327. data/specs/r_list_apply.spec.rb +15 -15
  328. data/specs/r_matrix.spec.rb +0 -0
  329. data/specs/r_nse.spec.rb +5 -5
  330. data/specs/r_object_send_dispatch_spec.rb +13 -0
  331. data/specs/r_vector_comparator_spec.rb +8 -0
  332. data/specs/r_vector_creation.spec.rb +0 -0
  333. data/specs/r_vector_functions.spec.rb +0 -0
  334. data/specs/r_vector_object.spec.rb +0 -0
  335. data/specs/r_vector_operators.spec.rb +0 -0
  336. data/specs/r_vector_structured_scalar_reads_spec.rb +35 -0
  337. data/specs/r_vector_subsetting.spec.rb +0 -0
  338. data/specs/range_helper_spec.rb +21 -0
  339. data/specs/rsupport_scope_spec.rb +28 -0
  340. data/specs/rsupport_var_name_thread_safety_spec.rb +24 -0
  341. data/specs/scalar_character_spec.rb +44 -0
  342. data/specs/scoped_symbol_dsl_refinement_spec.rb +40 -0
  343. data/specs/session_env_bridge_spec.rb +25 -0
  344. data/specs/simplecov_bootstrap_spec.rb +10 -0
  345. data/specs/spec_helper.rb +10 -0
  346. data/specs/tmp.rb +41 -20
  347. data/specs/unboxing_recursion_regression_spec.rb +30 -0
  348. data/specs/unboxing_spec.rb +49 -0
  349. data/specs/verify_callbacks.rb +42 -0
  350. data/sty/galaaz.sty +0 -0
  351. data/version.rb +1 -1
  352. metadata +239 -71
  353. data/blogs/galaaz_ggplot/galaaz_ggplot.aux +0 -41
  354. data/blogs/galaaz_ggplot/galaaz_ggplot.html +0 -705
  355. data/blogs/galaaz_ggplot/galaaz_ggplot.out +0 -10
  356. data/blogs/galaaz_ggplot/galaaz_ggplot.pdf +0 -0
  357. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/midwest_rb.pdf +0 -0
  358. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/scatter_plot_rb.pdf +0 -0
  359. data/blogs/galaaz_ggplot/midwest.html +0 -188
  360. data/blogs/gknit/gknit.html +0 -2266
  361. data/blogs/gknit/gknit.pdf +0 -0
  362. data/blogs/gknit/gknit.tex +0 -1358
  363. data/blogs/manual/graph.rb +0 -29
  364. data/blogs/manual/manual.html +0 -2995
  365. data/blogs/manual/manual.pdf +0 -0
  366. data/blogs/manual/manual_files/figure-latex/diverging_bar.pdf +0 -0
  367. data/blogs/nse_dplyr/nse_dplyr.html +0 -960
  368. data/blogs/nse_dplyr/nse_dplyr.pdf +0 -0
  369. data/blogs/nse_dplyr/nse_dplyr.tex +0 -1373
  370. data/blogs/oh_my/oh_my.html +0 -680
  371. data/blogs/ruby_plot/ruby_plot.Rmd_external_figs +0 -662
  372. data/blogs/ruby_plot/ruby_plot.html +0 -729
  373. data/blogs/ruby_plot/ruby_plot.pdf +0 -0
  374. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.svg +0 -57
  375. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.svg +0 -106
  376. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.svg +0 -110
  377. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.svg +0 -174
  378. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.svg +0 -236
  379. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.svg +0 -296
  380. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.svg +0 -236
  381. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.svg +0 -218
  382. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.svg +0 -128
  383. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.svg +0 -150
  384. data/examples/paper/paper.rb +0 -36
  385. data/specs/r_dataframe.spec.rb +0 -379
  386. data/specs/r_environment.spec.rb +0 -140
  387. data/specs/r_formula.spec.rb +0 -232
  388. data/specs/r_language.spec.rb +0 -112
  389. data/specs/r_list.spec.rb +0 -293
  390. data/specs/r_plots.spec.rb +0 -72
  391. data/specs/ruby_expression.spec.rb +0 -315
@@ -0,0 +1,1269 @@
1
+ % BibTeX standard bibliography style `aea' (one of the harvard family)
2
+ % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
3
+ % Copyright (C) 2008, all rights reserved.
4
+ % Melissa Rice (melissa@fmtek.net), Full Moon Technical Solutions, LLC (dba FMTek)
5
+ % last revised: 20 May 2009
6
+
7
+ ENTRY
8
+ { address
9
+ author
10
+ booktitle
11
+ chapter
12
+ edition
13
+ editor
14
+ howpublished
15
+ institution
16
+ journal
17
+ key
18
+ month
19
+ note
20
+ number
21
+ organization
22
+ pages
23
+ presented
24
+ publisher
25
+ school
26
+ series
27
+ title
28
+ type
29
+ URL
30
+ volume
31
+ year
32
+ }
33
+ { field.used etal.allowed etal.required}
34
+ { extra.label sort.label list.year }
35
+
36
+ STRINGS { s t f }
37
+
38
+ % BOOLEAN OPERATORS
39
+
40
+ FUNCTION {not}
41
+ { { #0 }
42
+ { #1 }
43
+ if$
44
+ }
45
+
46
+ FUNCTION {and}
47
+ { 'skip$
48
+ { pop$ #0 }
49
+ if$
50
+ }
51
+
52
+ FUNCTION {or}
53
+ { { pop$ #1 }
54
+ 'skip$
55
+ if$
56
+ }
57
+
58
+ % CHECKS
59
+
60
+ FUNCTION {author.or.editor.check}
61
+ { author empty$ editor empty$ and
62
+ { "empty author and editor in " cite$ * warning$ }
63
+ { skip$ }
64
+ if$
65
+ }
66
+
67
+ FUNCTION {chapter.or.pages.check}
68
+ { chapter empty$ pages empty$ and
69
+ { "empty chapter and pages in " cite$ * warning$ }
70
+ { skip$ }
71
+ if$
72
+ }
73
+
74
+
75
+ FUNCTION {required}
76
+ { 't := % name of variable
77
+ empty$ % value of variable on stack
78
+ { "empty " t * " in " * cite$ * warning$ }
79
+ { skip$ }
80
+ if$
81
+ }
82
+
83
+ FUNCTION {field.or.null}
84
+ { duplicate$ empty$
85
+ { pop$ "" }
86
+ 'skip$
87
+ if$
88
+ }
89
+
90
+ % GENERAL FORMATTING
91
+
92
+ FUNCTION {emphasize}
93
+ { duplicate$ empty$
94
+ { pop$ "" }
95
+ { "{\em " swap$ * "}" * }
96
+ if$
97
+ }
98
+
99
+ FUNCTION {embolden}
100
+ { duplicate$ empty$
101
+ { pop$ "" }
102
+ { "{\bf " swap$ * "}" * }
103
+ if$
104
+ }
105
+
106
+ FUNCTION {quote}
107
+ { duplicate$ empty$
108
+ { pop$ "" }
109
+ { "`" swap$ * "'" * }
110
+ if$
111
+ }
112
+
113
+ FUNCTION {doublequote}
114
+ { duplicate$ empty$
115
+ { pop$ "" }
116
+ { "``" swap$ * "''" * }
117
+ if$
118
+ }
119
+
120
+ FUNCTION {join}
121
+ { 't := % second string
122
+ 'f := % join character
123
+ 's := % first string
124
+ s empty$
125
+ { t empty$
126
+ { "" }
127
+ { t }
128
+ if$
129
+ }
130
+ { t empty$
131
+ { s }
132
+ { f ". " =
133
+ { s add.period$ " " * t * }
134
+ { s f * t * }
135
+ if$
136
+ }
137
+ if$
138
+ }
139
+ if$
140
+ }
141
+
142
+ FUNCTION {tie.or.space.connect}
143
+ { duplicate$ text.length$ #3 <
144
+ { "~" }
145
+ { " " }
146
+ if$
147
+ swap$ * *
148
+ }
149
+
150
+ INTEGERS { len }
151
+
152
+ FUNCTION {chop.word}
153
+ { 's :=
154
+ 'len :=
155
+ s #1 len substring$ =
156
+ { s len #1 + global.max$ substring$ }
157
+ 's
158
+ if$
159
+ }
160
+
161
+ INTEGERS { ind tsslen }
162
+
163
+ STRINGS { tss ret rss istr }
164
+
165
+ FUNCTION {replace.substring}{
166
+ 'rss :=
167
+ 'tss :=
168
+ 'istr :=
169
+ "" 'ret :=
170
+ tss text.length$ 'tsslen :=
171
+ #1 'ind :=
172
+ { istr ind tsslen substring$ "" = not }
173
+ { istr ind tsslen substring$ tss =
174
+ { ret rss * 'ret :=
175
+ ind tsslen + 'ind :=
176
+ }
177
+ { ret istr ind #1 substring$ * 'ret :=
178
+ ind #1 + 'ind :=
179
+ }
180
+ if$
181
+ }
182
+ while$
183
+ ret
184
+ }
185
+
186
+ FUNCTION {n.dashify}
187
+ { 't :=
188
+ ""
189
+ { t empty$ not }
190
+ { t #1 #1 substring$ "-" =
191
+ { t #1 #2 substring$ "--" = not
192
+ { "--" *
193
+ t #2 global.max$ substring$ 't :=
194
+ }
195
+ { { t #1 #1 substring$ "-" = }
196
+ { "-" *
197
+ t #2 global.max$ substring$ 't :=
198
+ }
199
+ while$
200
+ }
201
+ if$
202
+ }
203
+ { t #1 #1 substring$ *
204
+ t #2 global.max$ substring$ 't :=
205
+ }
206
+ if$
207
+ }
208
+ while$
209
+ }
210
+
211
+ INTEGERS { multiresult }
212
+
213
+ FUNCTION {multi.page.check}
214
+ { 't :=
215
+ #0 'multiresult :=
216
+ { multiresult not
217
+ t empty$ not
218
+ and
219
+ }
220
+ { t #1 #1 substring$
221
+ duplicate$ "-" =
222
+ swap$ duplicate$ "," =
223
+ swap$ "+" =
224
+ or or
225
+ { #1 'multiresult := }
226
+ { t #2 global.max$ substring$ 't := }
227
+ if$
228
+ }
229
+ while$
230
+ multiresult
231
+ }
232
+
233
+
234
+ % OUTPUT FUNCTIONS
235
+
236
+ FUNCTION {output} % writ
237
+ { duplicate$ empty$
238
+ { pop$ }
239
+ { write$}
240
+ if$
241
+ }
242
+
243
+ FUNCTION {output.year} % writ
244
+ { list.year empty$
245
+ { skip$ }
246
+ { list.year ". " * write$}
247
+ if$
248
+ }
249
+
250
+ FUNCTION {output.title.quoted}
251
+ { title empty$
252
+ { skip$ }
253
+ { title add.period$ doublequote " " * write$ }
254
+ if$
255
+ }
256
+
257
+ FUNCTION {output.title.italic}
258
+ { title empty$
259
+ { skip$ }
260
+ { title add.period$ emphasize " " * write$ }
261
+ if$
262
+ }
263
+
264
+ FUNCTION {output.entry}
265
+ { duplicate$ "" =
266
+ { pop$ }
267
+ { add.period$
268
+ write$
269
+ }
270
+ if$
271
+ newline$
272
+ }
273
+
274
+ % FIELD FORMATTING
275
+
276
+ FUNCTION {format.address.only}
277
+ { address empty$
278
+ { "" }
279
+ { address }
280
+ if$
281
+ }
282
+
283
+ FUNCTION {format.journal}
284
+ { journal empty$
285
+ { "" }
286
+ { journal emphasize }
287
+ if$
288
+ }
289
+
290
+ FUNCTION {format.type}
291
+ { type empty$
292
+ { "" }
293
+ { type }
294
+ if$
295
+ }
296
+
297
+ FUNCTION {format.number}
298
+ { number empty$
299
+ { "" }
300
+ { number }
301
+ if$
302
+ }
303
+
304
+
305
+ FUNCTION {format.school}
306
+ { school empty$
307
+ { "" }
308
+ { school }
309
+ if$
310
+ }
311
+
312
+ FUNCTION {format.institution}
313
+ { institution empty$
314
+ { "" }
315
+ { institution }
316
+ if$
317
+ }
318
+
319
+ FUNCTION {format.masters}
320
+ { "Master's diss."
321
+ }
322
+
323
+ FUNCTION {format.phd}
324
+ { "PhD diss."
325
+ }
326
+
327
+ FUNCTION {format.note}
328
+ { note empty$
329
+ { "" }
330
+ { note }
331
+ if$
332
+ }
333
+
334
+ FUNCTION {format.booktitle}
335
+ { booktitle empty$
336
+ { "" }
337
+ { booktitle emphasize }
338
+ if$
339
+ }
340
+
341
+ FUNCTION {format.booktitle.label}
342
+ { booktitle empty$
343
+ { "" }
344
+ { booktitle embolden }
345
+ if$
346
+ }
347
+
348
+ FUNCTION {format.title.bold}
349
+ { title empty$
350
+ { "" }
351
+ { title add.period$ embolden }
352
+ if$
353
+ }
354
+
355
+ FUNCTION {format.month}
356
+ { month empty$
357
+ { "" }
358
+ { month }
359
+ if$
360
+ }
361
+
362
+ FUNCTION {format.vol.num.pages} % writ
363
+ { volume empty$
364
+ { number empty$
365
+ {""}
366
+ { "there's a number but no volume in " cite$ * warning$ ", (" number * ")" *}
367
+ if$
368
+ }
369
+ { number empty$
370
+ { volume }
371
+ { volume "(" * number * ")" *}
372
+ if$
373
+ }
374
+ if$
375
+ pages empty$
376
+ { skip$ }
377
+ { duplicate$ "" =
378
+ { pages n.dashify * }
379
+ { ":~" * pages n.dashify * }
380
+ if$
381
+ }
382
+ if$
383
+ }
384
+
385
+ FUNCTION {format.edition} % writ
386
+ { edition empty$
387
+ { "" }
388
+ { edition " ed." * }
389
+ if$
390
+ }
391
+
392
+ FUNCTION {format.book.vol.series.ed} % writ
393
+ { volume empty$
394
+ { series empty$
395
+ { "" }
396
+ { series emphasize }
397
+ if$
398
+ }
399
+ { "Vol." volume tie.or.space.connect
400
+ series empty$
401
+ 'skip$
402
+ { " of " * series emphasize * }
403
+ if$
404
+ }
405
+ if$
406
+ edition empty$
407
+ { skip$ }
408
+ { ". " * edition * " ed." *}
409
+ if$
410
+ }
411
+
412
+ FUNCTION {format.address.publisher} % writ
413
+ { address empty$
414
+ { publisher empty$
415
+ { "" }
416
+ { publisher }
417
+ if$
418
+ }
419
+ { publisher empty$
420
+ { address }
421
+ { address ":" * publisher *}
422
+ if$
423
+ }
424
+ if$
425
+ }
426
+
427
+ FUNCTION {format.howpublished}
428
+ { howpublished empty$
429
+ { "" }
430
+ { howpublished emphasize }
431
+ if$
432
+ }
433
+
434
+ FUNCTION {format.organization}
435
+ { organization empty$
436
+ { "" }
437
+ { organization }
438
+ if$
439
+ }
440
+
441
+ FUNCTION {format.organization.presented}
442
+ { organization empty$
443
+ { "" }
444
+ { presented empty$
445
+ { organization }
446
+ { presented " " * organization * }
447
+ if$
448
+ }
449
+ if$
450
+ }
451
+
452
+ FUNCTION {format.pages}
453
+ { pages empty$
454
+ { "" }
455
+ { pages multi.page.check
456
+ { pages n.dashify }
457
+ { pages }
458
+ if$
459
+ }
460
+ if$
461
+ }
462
+
463
+ FUNCTION {format.chapter.pages}
464
+ { chapter empty$
465
+ { pages empty$
466
+ { "" }
467
+ { format.pages }
468
+ if$
469
+ }
470
+ { pages empty$
471
+ { "Chapter " chapter * }
472
+ { "Chapter " chapter * ", " * format.pages * }
473
+ if$
474
+ }
475
+ if$
476
+ }
477
+
478
+ INTEGERS { nameptr namesleft numnames }
479
+
480
+ % Format names so that first author is "last, first" and subsequent authors are "first last" with commas
481
+ % separating authors whenever there are two or more and "and" precedes last author if 2 or more.
482
+ FUNCTION {format.names}
483
+ { 's :=
484
+ #1 'nameptr :=
485
+ s num.names$ 'numnames :=
486
+ numnames 'namesleft :=
487
+ { namesleft #0 > }
488
+ { nameptr #1 =
489
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
490
+ { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't := }
491
+ if$
492
+ nameptr #1 >
493
+ { namesleft #1 >
494
+ { ", " * t * }
495
+ { t "others" =
496
+ { ", et~al." * }
497
+ { ", and " * t * }
498
+ if$
499
+ }
500
+ if$
501
+ }
502
+ 't
503
+ if$
504
+ nameptr #1 + 'nameptr :=
505
+ namesleft #1 - 'namesleft :=
506
+ }
507
+ while$
508
+ }
509
+
510
+ FUNCTION {format.names.forward}
511
+ { 's :=
512
+ #1 'nameptr :=
513
+ s num.names$ 'numnames :=
514
+ numnames 'namesleft :=
515
+ { namesleft #0 > }
516
+ { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't :=
517
+ nameptr #1 >
518
+ { namesleft #1 >
519
+ { ", " * t * }
520
+ { t "others" =
521
+ { " et~al." * }
522
+ { " and " * t * }
523
+ if$
524
+ }
525
+ if$
526
+ }
527
+ 't
528
+ if$
529
+ nameptr #1 + 'nameptr :=
530
+ namesleft #1 - 'namesleft :=
531
+ }
532
+ while$
533
+ }
534
+
535
+ INTEGERS { author.field editor.field organization.field title.field key.field }
536
+
537
+ FUNCTION {init.field.constants}
538
+ { #0 'author.field :=
539
+ #1 'editor.field :=
540
+ #2 'organization.field :=
541
+ #3 'title.field :=
542
+ #4 'key.field :=
543
+ }
544
+
545
+
546
+
547
+ FUNCTION {format.names.label}
548
+ { 's :=
549
+ #1 'nameptr :=
550
+ s num.names$ 'numnames :=
551
+ numnames 'namesleft :=
552
+ { namesleft #0 > }
553
+ { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't :=
554
+ nameptr #1 >
555
+ { namesleft #1 >
556
+ { ", " * t * }
557
+ { t "others" =
558
+ { " et~al." * }
559
+ { " \harvardand\ " * t * }
560
+ if$
561
+ }
562
+ if$
563
+ }
564
+ 't
565
+ if$
566
+ nameptr #1 + 'nameptr :=
567
+ namesleft #1 - 'namesleft :=
568
+ }
569
+ while$
570
+ }
571
+
572
+ FUNCTION {format.names.label.short}
573
+ { 's :=
574
+ #1 'nameptr :=
575
+ s num.names$ 'numnames :=
576
+ numnames #3 >
577
+ { s #1 "{vv~}{ll}" format.name$ " et~al." *}
578
+ { numnames 'namesleft :=
579
+ { namesleft #0 > }
580
+ { s nameptr "{vv~}{ll}" format.name$ 't :=
581
+ nameptr #1 >
582
+ { namesleft #1 >
583
+ { ", " * t * }
584
+ { t "others" =
585
+ { " et~al." * }
586
+ { " \harvardand\ " * t * }
587
+ if$
588
+ }
589
+ if$
590
+ }
591
+ 't
592
+ if$
593
+ nameptr #1 + 'nameptr :=
594
+ namesleft #1 - 'namesleft :=
595
+ }
596
+ while$
597
+ }
598
+ if$
599
+ }
600
+
601
+ FUNCTION {format.authors}
602
+ { author empty$
603
+ { "" }
604
+ { author format.names add.period$ embolden}
605
+ if$
606
+ }
607
+
608
+ FUNCTION {format.editors}
609
+ { editor empty$
610
+ { "" }
611
+ { editor format.names add.period$ embolden}
612
+ if$
613
+ }
614
+
615
+ FUNCTION {format.editors.primary}
616
+ { editor empty$
617
+ { "" }
618
+ { editor format.names ", " * embolden " ed" *}
619
+ if$
620
+ }
621
+
622
+ FUNCTION {format.editors.secondary}
623
+ { editor empty$
624
+ { "" }
625
+ { ", ed. " editor format.names.forward *}
626
+ if$
627
+ }
628
+
629
+ FUNCTION {make.list.label} % writ
630
+ { author.field field.used =
631
+ { format.authors }
632
+ { editor.field field.used =
633
+ { format.editors.primary }
634
+ { organization.field field.used =
635
+ { "The " #4 organization chop.word embolden }
636
+ { title.field field.used =
637
+ { format.title.bold }
638
+ { key.field field.used =
639
+ { key }
640
+ { "Internal error :001 on " cite$ * " label" * warning$ }
641
+ if$
642
+ }
643
+ if$
644
+ }
645
+ if$
646
+ }
647
+ if$
648
+ }
649
+ if$
650
+ }
651
+
652
+ FUNCTION {output.list.label} % writ
653
+ { make.list.label add.period$ " " * write$
654
+ }
655
+
656
+ FUNCTION {make.label.short} % writ
657
+ { author.field field.used =
658
+ { author format.names.label.short }
659
+ { editor.field field.used =
660
+ { editor format.names.label.short }
661
+ { organization.field field.used =
662
+ { "The " #4 organization chop.word}
663
+ { title.field field.used =
664
+ { format.booktitle.label }
665
+ { key.field field.used =
666
+ { key }
667
+ {"Internal error :001 on " cite$ * " label" * warning$ }
668
+ if$
669
+ }
670
+ if$
671
+ }
672
+ if$
673
+ }
674
+ if$
675
+ }
676
+ if$
677
+ }
678
+
679
+ FUNCTION {make.label.full} % writ
680
+ { author.field field.used =
681
+ { author format.names.label }
682
+ { editor.field field.used =
683
+ { editor format.names.label }
684
+ { organization.field field.used =
685
+ { "The " #4 organization chop.word}
686
+ { title.field field.used =
687
+ { format.booktitle.label }
688
+ { key.field field.used =
689
+ { key }
690
+ {"Internal error :001 on " cite$ * " label" * warning$ }
691
+ if$
692
+ }
693
+ if$
694
+ }
695
+ if$
696
+ }
697
+ if$
698
+ }
699
+ if$
700
+ }
701
+
702
+ % bibitem syntax:
703
+ % \harvarditem[abbr-citation]{full-citation}{citation-year}{cite-key}
704
+ % abbr-citation: names for 2nd and subsequent citations
705
+ % full-citation: names for 1st citation
706
+
707
+ % Give full name (first name, middle initial, and last name) of author(s) and year of publication in the first citation.
708
+ % Give the last name of author and year of publication in parentheses for each subsequent citation.
709
+ % If there are four or more authors, refer to the first author, followed by et al. and the year.
710
+
711
+ FUNCTION {output.bibitem} % writ
712
+ { newline$
713
+ "\harvarditem[" make.label.short * "]" *
714
+ "{" make.label.full * "}" * *
715
+ "{" list.year * "}" * *
716
+ "{" cite$ * "}" * * write$
717
+ newline$
718
+ }
719
+
720
+ FUNCTION {stack.show}
721
+ { duplicate$ "stack top: " swap$ * " in " * cite$ * warning$
722
+ duplicate$ "" =
723
+ { "stack top is blank" warning$ }
724
+ { "stack top is non-blank" warning$ }
725
+ if$
726
+ }
727
+ FUNCTION {article} % writ
728
+ { output.bibitem
729
+ output.list.label % write author or surrogate label
730
+ output.year
731
+ output.title.quoted
732
+ author "author" required
733
+ title "title" required
734
+ journal "journal" required
735
+ year "year" required
736
+ format.journal ", "
737
+ % format.month join ", "
738
+ format.vol.num.pages join ". "
739
+ format.note join
740
+ output.entry
741
+ }
742
+
743
+ FUNCTION {book}
744
+ { output.bibitem
745
+ output.list.label % write author or surrogate label
746
+ output.year
747
+ output.title.italic
748
+ author.or.editor.check
749
+ title "title" required
750
+ publisher "publisher" required
751
+ year "year" required
752
+ % format.month ", "
753
+ % format.book.vol.series.ed join ", "
754
+ format.book.vol.series.ed ", "
755
+ format.address.publisher join ". "
756
+ format.note join
757
+ output.entry
758
+ }
759
+
760
+
761
+ FUNCTION {booklet}
762
+ { output.bibitem
763
+ output.list.label % write author or surrogate label
764
+ year empty$
765
+ { skip$ }
766
+ { output.year }
767
+ if$
768
+ author empty$
769
+ { skip$ }
770
+ { output.title.quoted }
771
+ if$
772
+ title "title" required
773
+ format.howpublished ", "
774
+ % format.month join ", "
775
+ format.address.only join ". "
776
+ format.note join
777
+ output.entry
778
+ }
779
+
780
+ FUNCTION {inbook}
781
+ { output.bibitem
782
+ output.list.label % write author or surrogate label
783
+ output.year
784
+ output.title.quoted
785
+ author.or.editor.check
786
+ chapter.or.pages.check
787
+ title "title" required
788
+ publisher "publisher" required
789
+ year "year" required
790
+ format.booktitle ", "
791
+ format.editors.secondary join " "
792
+ format.book.vol.series.ed join ", "
793
+ format.chapter.pages join ". "
794
+ format.address.publisher join ". "
795
+ format.note join
796
+ output.entry
797
+ }
798
+
799
+ FUNCTION {incollection}
800
+ { output.bibitem
801
+ output.list.label % write author or surrogate label
802
+ output.year
803
+ output.title.quoted
804
+ "In " format.booktitle * ". " * output
805
+ author "author" required
806
+ title "title" required
807
+ booktitle "booktitle" required
808
+ publisher "publisher" required
809
+ year "year" required
810
+ format.book.vol.series.ed ", "
811
+ format.editors.secondary join ", "
812
+ format.chapter.pages join ". "
813
+ format.address.publisher join ". "
814
+ format.note join
815
+ output.entry
816
+ }
817
+
818
+ FUNCTION {inproceedings}
819
+ { output.bibitem
820
+ output.list.label % write author or surrogate label
821
+ output.year
822
+ output.title.quoted
823
+ author "author" required
824
+ title "title" required
825
+ booktitle "booktitle" required
826
+ year "year" required
827
+ format.book.vol.series.ed ", "
828
+ format.pages join ", "
829
+ format.organization.presented join ". "
830
+ format.address.publisher join ". "
831
+ format.note join
832
+ output.entry
833
+ }
834
+
835
+ FUNCTION {conference} { inproceedings }
836
+
837
+ FUNCTION {manual}
838
+ { output.bibitem
839
+ output.list.label % write author or surrogate label
840
+ title "title" required
841
+ year empty$
842
+ { skip$ }
843
+ { output.year }
844
+ if$
845
+ author empty$
846
+ { skip$ }
847
+ { output.title.quoted }
848
+ if$
849
+ format.edition ", "
850
+ format.address.only join ", "
851
+ format.organization join ", "
852
+ % format.month join ", "
853
+ format.note join
854
+ output.entry
855
+ }
856
+
857
+ FUNCTION {mastersthesis}
858
+ { output.bibitem
859
+ output.list.label % write author or surrogate label
860
+ output.year
861
+ output.title.quoted
862
+ author "author" required
863
+ title "title" required
864
+ school "school" required
865
+ year "year" required
866
+ format.masters " "
867
+ format.school join ", "
868
+ format.address.only join ", "
869
+ % format.month join ", "
870
+ format.note join
871
+ output.entry
872
+ }
873
+
874
+ FUNCTION {misc}
875
+ { output.bibitem
876
+ output.list.label % write author or surrogate label
877
+ output.year
878
+ author empty$
879
+ { skip$ }
880
+ { output.title.quoted }
881
+ if$
882
+ format.howpublished ", "
883
+ % format.month join ". "
884
+ format.note join
885
+ output.entry
886
+ }
887
+
888
+ FUNCTION {phdthesis}
889
+ { output.bibitem
890
+ output.list.label % write author or surrogate label
891
+ output.year
892
+ output.title.quoted
893
+ author "author" required
894
+ title "title" required
895
+ school "school" required
896
+ year "year" required
897
+ format.phd " "
898
+ format.school join ", "
899
+ format.address.only join ", "
900
+ % format.month join ". "
901
+ format.note join
902
+ output.entry
903
+ }
904
+
905
+ FUNCTION {proceedings}
906
+ { output.bibitem
907
+ output.list.label % write author or surrogate label
908
+ output.year
909
+ title "title" required
910
+ year "year" required
911
+ editor empty$ organization empty$ and
912
+ { skip$ }
913
+ { output.title.quoted }
914
+ if$
915
+ editor empty$
916
+ { "" "" }
917
+ { format.organization ", " }
918
+ if$
919
+ format.address.publisher join ", "
920
+ format.note join
921
+ output.entry
922
+ }
923
+
924
+ FUNCTION {techreport}
925
+ { output.bibitem
926
+ output.list.label % write author or surrogate label
927
+ output.year
928
+ output.title.quoted
929
+ author "author" required
930
+ title "title" required
931
+ institution "institution" required
932
+ year "year" required
933
+ format.institution " "
934
+ format.type join " "
935
+ format.number join ", "
936
+ % format.month join ", "
937
+ format.address.publisher join ". "
938
+ format.note join
939
+ output.entry
940
+ }
941
+
942
+ FUNCTION {unpublished}
943
+ { output.bibitem
944
+ output.list.label % write author or surrogate label
945
+ year empty$
946
+ { skip$ }
947
+ { output.year }
948
+ if$
949
+ output.title.quoted
950
+ author "author" required
951
+ title "title" required
952
+ note "note" required
953
+ format.note
954
+ output.entry
955
+ }
956
+
957
+
958
+ FUNCTION {default.type} { misc }
959
+
960
+ MACRO {jan} {"January"}
961
+
962
+ MACRO {feb} {"February"}
963
+
964
+ MACRO {mar} {"March"}
965
+
966
+ MACRO {apr} {"April"}
967
+
968
+ MACRO {may} {"May"}
969
+
970
+ MACRO {jun} {"June"}
971
+
972
+ MACRO {jul} {"July"}
973
+
974
+ MACRO {aug} {"August"}
975
+
976
+ MACRO {sep} {"September"}
977
+
978
+ MACRO {oct} {"October"}
979
+
980
+ MACRO {nov} {"November"}
981
+
982
+ MACRO {dec} {"December"}
983
+
984
+ READ
985
+
986
+ EXECUTE {init.field.constants}
987
+
988
+ FUNCTION {sortify}
989
+ { purify$
990
+ "l" change.case$
991
+ }
992
+
993
+ FUNCTION {sortify.names}
994
+ { " \harvardand\ " " " replace.substring
995
+ " et~al." " zzz" replace.substring
996
+ sortify
997
+ }
998
+
999
+ FUNCTION {author.key.label}
1000
+ { author empty$
1001
+ { key empty$
1002
+ { title.field 'field.used := }
1003
+ { key.field 'field.used := }
1004
+ if$
1005
+ }
1006
+ { author.field 'field.used := }
1007
+ if$
1008
+ }
1009
+
1010
+ FUNCTION {author.editor.key.label}
1011
+ { author empty$
1012
+ { editor empty$
1013
+ { key empty$
1014
+ { title.field 'field.used := }
1015
+ { key.field 'field.used := }
1016
+ if$
1017
+ }
1018
+ { editor.field 'field.used := }
1019
+ if$
1020
+ }
1021
+ { author.field 'field.used := }
1022
+ if$
1023
+ }
1024
+
1025
+ FUNCTION {author.key.organization.label}
1026
+ { author empty$
1027
+ { key empty$
1028
+ { organization empty$
1029
+ { title.field 'field.used := }
1030
+ { organization.field 'field.used := }
1031
+ if$
1032
+ }
1033
+ { key.field 'field.used := }
1034
+ if$
1035
+ }
1036
+ { author.field 'field.used := }
1037
+ if$
1038
+ }
1039
+
1040
+ FUNCTION {editor.key.organization.label}
1041
+ { editor empty$
1042
+ { key empty$
1043
+ { organization empty$
1044
+ { title.field 'field.used := }
1045
+ { organization.field 'field.used := }
1046
+ if$
1047
+ }
1048
+ { key.field 'field.used := }
1049
+ if$
1050
+ }
1051
+ { editor.field 'field.used := }
1052
+ if$
1053
+ }
1054
+
1055
+ FUNCTION {sort.format.title}
1056
+ { 't :=
1057
+ "A " #2
1058
+ "An " #3
1059
+ "The " #4 t chop.word
1060
+ chop.word
1061
+ chop.word
1062
+ sortify
1063
+ #1 global.max$ substring$
1064
+ }
1065
+
1066
+ FUNCTION {calc.label}
1067
+ { make.label.short
1068
+ title.field field.used =
1069
+ { sort.format.title }
1070
+ { sortify.names }
1071
+ if$
1072
+ year field.or.null purify$ #-1 #4 substring$ sortify
1073
+ *
1074
+ 'sort.label :=
1075
+ }
1076
+
1077
+ FUNCTION {preliminaries}
1078
+ { type$ "book" =
1079
+ type$ "inbook" =
1080
+ or
1081
+ 'author.editor.key.label
1082
+ { type$ "proceedings" =
1083
+ 'editor.key.organization.label
1084
+ { type$ "manual" =
1085
+ 'author.key.organization.label
1086
+ 'author.key.label
1087
+ if$
1088
+ }
1089
+ if$
1090
+ }
1091
+ if$
1092
+ author.field field.used =
1093
+ {
1094
+ author num.names$ #2 >
1095
+ { #1 }
1096
+ { #0 }
1097
+ if$
1098
+ 'etal.required :=
1099
+ }
1100
+ {
1101
+ editor.field field.used =
1102
+ {
1103
+ editor num.names$ #2 >
1104
+ { #1 }
1105
+ { #0 }
1106
+ if$
1107
+ }
1108
+ { #0 }
1109
+ if$
1110
+ 'etal.required :=
1111
+ }
1112
+ if$
1113
+ #1 'etal.allowed :=
1114
+ }
1115
+
1116
+ FUNCTION {first.presort}
1117
+ { calc.label
1118
+ sort.label
1119
+ title.field field.used =
1120
+ { skip$ }
1121
+ { " "
1122
+ *
1123
+ make.list.label sortify.names
1124
+ *
1125
+ " "
1126
+ *
1127
+ title field.or.null
1128
+ sort.format.title
1129
+ *
1130
+ }
1131
+ if$
1132
+ #1 entry.max$ substring$
1133
+ 'sort.key$ :=
1134
+ }
1135
+
1136
+ ITERATE {preliminaries}
1137
+
1138
+ ITERATE {first.presort}
1139
+
1140
+ SORT
1141
+
1142
+ STRINGS { last.sort.label next.extra last.full.label}
1143
+
1144
+ INTEGERS { last.extra.num last.etal.allowed}
1145
+
1146
+ FUNCTION {initialize.confusion}
1147
+ { #0 int.to.chr$ 'last.sort.label :=
1148
+ #0 int.to.chr$ 'last.full.label :=
1149
+ #1 'last.etal.allowed :=
1150
+ }
1151
+
1152
+ FUNCTION {confusion.pass}
1153
+ { last.sort.label sort.label =
1154
+ { last.etal.allowed
1155
+ { last.full.label make.label.full sortify.names =
1156
+ { skip$ }
1157
+ { #0 'etal.allowed :=
1158
+ #0 'last.etal.allowed :=
1159
+ }
1160
+ if$
1161
+ }
1162
+ { #0 'etal.allowed := }
1163
+ if$
1164
+ }
1165
+ { sort.label 'last.sort.label :=
1166
+ make.label.full sortify.names 'last.full.label :=
1167
+ #1 'last.etal.allowed :=
1168
+ }
1169
+ if$
1170
+ }
1171
+
1172
+ EXECUTE {initialize.confusion}
1173
+
1174
+ ITERATE {confusion.pass}
1175
+
1176
+ EXECUTE {initialize.confusion}
1177
+
1178
+ REVERSE {confusion.pass}
1179
+
1180
+ FUNCTION {initialize.last.extra.num}
1181
+ { #0 int.to.chr$ 'last.sort.label :=
1182
+ "" 'next.extra :=
1183
+ #0 'last.extra.num :=
1184
+ }
1185
+
1186
+ FUNCTION {forward.pass}
1187
+ { last.sort.label sort.label =
1188
+ { last.extra.num #1 + 'last.extra.num :=
1189
+ last.extra.num int.to.chr$ 'extra.label :=
1190
+ }
1191
+ { "a" chr.to.int$ 'last.extra.num :=
1192
+ "" 'extra.label :=
1193
+ sort.label 'last.sort.label :=
1194
+ }
1195
+ if$
1196
+ }
1197
+
1198
+ FUNCTION {reverse.pass}
1199
+ { next.extra "b" =
1200
+ { "a" 'extra.label := }
1201
+ 'skip$
1202
+ if$
1203
+ year empty$
1204
+ { "n.d." extra.label emphasize * 'list.year := }
1205
+ { year extra.label emphasize * 'list.year := }
1206
+ if$
1207
+ extra.label 'next.extra :=
1208
+ }
1209
+
1210
+ ITERATE {first.presort}
1211
+
1212
+ SORT
1213
+
1214
+ EXECUTE {initialize.last.extra.num}
1215
+
1216
+ ITERATE {forward.pass}
1217
+
1218
+ REVERSE {reverse.pass}
1219
+
1220
+ FUNCTION {second.presort}
1221
+ { make.list.label
1222
+ title.field field.used =
1223
+ { sort.format.title }
1224
+ { sortify.names }
1225
+ if$
1226
+ " "
1227
+ *
1228
+ list.year field.or.null sortify
1229
+ *
1230
+ " "
1231
+ *
1232
+ title.field field.used =
1233
+ { skip$ }
1234
+ { title field.or.null
1235
+ sort.format.title
1236
+ *
1237
+ }
1238
+ if$
1239
+ #1 entry.max$ substring$
1240
+ 'sort.key$ :=
1241
+ }
1242
+
1243
+ ITERATE {second.presort}
1244
+
1245
+ SORT
1246
+
1247
+ FUNCTION {begin.bib}
1248
+ { newline$ newline$ "% Bibstyle aea.bst version 2009.05.20" write$ newline$ newline$
1249
+ preamble$ empty$
1250
+ 'skip$
1251
+ { "\harvardpreambledefs{%" write$ newline$
1252
+ preamble$ write$ "}" write$ newline$
1253
+ "\harvardpreambletext{%" write$ newline$
1254
+ preamble$ write$ "}" write$ newline$ }
1255
+ if$
1256
+ "\begin{thebibliography}{xx}" write$ newline$
1257
+ }
1258
+
1259
+ EXECUTE {begin.bib}
1260
+
1261
+ ITERATE {call.type$}
1262
+
1263
+ FUNCTION {end.bib}
1264
+ { newline$
1265
+ "\end{thebibliography}" write$ newline$
1266
+ }
1267
+
1268
+ EXECUTE {end.bib}
1269
+