←
Home
日本語
Kenji Sato
economics and programing
email
facebook
githubalt
twitterbird
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).