Here’s some simple mistakes inexperienced R programmers make.
c() creates a vector
When you read R code, you see stuff like
c(1, 2, 3) a lot. So, obviously that’s how you make a vector, right? Then you write stuff like
if (c(2) + c(2) == c(4)) ...
DU FU: A beautiful night!
LI BAI: Perfectly clear. Can you see the Plough?
DU: Over there, low on the horizon. And isn’t that Orion? But you didn’t invite me here to do astronomy. What is this… contraption?
He points at something like a high-tech barrel organ.
LI: Keep looking…
I’m an academic. Our university uses Blackboard to manage its courses. Using Blackboard is compulsory. Like everything that humans have to be made to use, it sucks. You have to be made to use it, because it sucks; it sucks, because you’re made to use it.
Here, then, is a…
This took me a long time to figure out.
Points to note:
Here’s the relevant chunks of appveyor.yml, showing how to get tinytex installed and download a package. This assumes that
tinytex is a dependency listed in your DESCRIPTION file.
- travis-tool.sh install_deps
- cmd: Rscript -e "tinytex::install_tinytex()"
- cmd: Rscript -e "tinytex::tlmgr_install('latexdiff')"
- cmd: Rscript -e "tinytex::tlmgr_path('add')"
I’m a tidyverse fan. I am not hugely interested in “tidyverse vs. base R” conflicts. I’ve been using R for quite a while; many tidyverse packages (and RStudio) have made it a lot nicer to work in.
I do feel there is one fair point made on the anti-tidyverse side…
If you use rmarkdown to produce pdfs, you may find you have problems with the latest RStudio when printing out LaTeX tables using R packages like
huxtable. Recent versions of pandoc often escape TeX, resulting in errors when you try to compile your PDF.
You can check if…