←
Home
日本語
Kenji Sato
economics and programing
email
facebook
githubalt
twitterbird
juicedown v0.1.1
juicedown juicedown v0.1.1 is now available on CRAN 🎉 install.packages("juicedown") What Does It Do? It is a small package that combines two basic tasks into one: Write documents in R Markdown and convert them to HTML (R Markdown v1). Convert HTML with inlined CSS (juice). Motivation There has been a cost-saving trend in my university and they recommend instructors against printing teaching material. Also, students also bring their own PCs to the university.
Generate bordered tables with exams::exams2mooodle
Motivation By default, tables in moodle problems created with exams::exams2moodle do not have table or cell borders. I want tables with borders! If you does too, you might find this post useful. Stylesheet Create a style for a class you will use for tables. Note that this is not a CSS file but a HTML code snippet that you want to include in markdown files. Instead of styling a class, it’s possible to style table tag itself.
Cross Referenceable Equation with Preview in RMarkdown
Cross-referenceable math equation in RMarkdown You can cross-reference equations in Rmarkdown if you set output to bookdown::pdf_document2 and write equations within \begin{align} ~ \end{align} or \begin{equation} ~ \end{equation} To make a tag, put (\#eq:label_name) inside a math environment. The equation can be cross-referenced by \＠ref(eq:label_name). See this stackoverflow answer by Yihui Xie and the related section of his bookdown book for more detail. \begin{equation*} ~ \end{equation*} also produces an equation without number.
Computation of the Optimal Policy for the Optimal Growth (Euler Equation)
(Mainly for students attending my class.) As supplementary matrials on our way to understanding the optimal growth model, I put an R code and related documents on my github repository: kenjisato/intro-macro: /r/optimal_growth_euler.R /doc/r/optimal_growth_euler.Rmd Compiled PDF I do this mainly for a pedagogical reason. As a matter of fact, the above mentioned script isn’t practical; it does work if the initial condition is close to the steady state and the initial guesses of optimal consumption are sufficiently accurate but otherwise doesn’t (it’d take very loong time).