Brian J. Knaus

Brian J. Knaus’s blog about genomics and biology.

Validating ASAN

The address sanitizer (ASAN) is a tool produced by google that detects memory coruption bugs. It is relevant to the work I do, in part, because CRAN checks contributed packages with this tool. This is a good practice on the part of CRAN to ensure that packages it hosts lack bugs. However, if you are unfamiliar with this tool it may present a formidable challenge to use. Here I explain how I’ve implemented it in my work. Read more →

A first post using blogdown

Once you have Hugo and blogdown set up you should be ready to blog! How to set up Hugo and blogdown was briefly covered in a previous post, with links to more information. We can use blogdown to create a template for our first blog. library(blogdown) new_post(title="A first post using blogdown", rmd = TRUE) This creates a file named: ./content/post/2017-06-03-a-first-post-using-blogdown.Rmd where ‘.’ is the root directory of your project. The function new_post() prefixes your post’s title with todays date to create the filename. Read more →

Running R in Docker

Docker is a ‘container,’ or a mini-operating system, you can run within your existing operating system. This is nice because you can build an environment where you can build and test code. And if it breaks, you can kill it and start a new container and start again. In the context of R development there are at least two good reasons someone would want to run R in Docker. First, the CRAN Repository Policy (Version $Revision: 3679 $) asserts that submitted packages should be tested with the current version of R-devel. Read more →

Hello blogdown

This is my first blog. Hello blogdown! I built this site using the directions I found at this link provided by Amber Thomas. Note that the scripts ‘’ and ‘’ work on your GitHub repository names ‘’. Even if you think you’re building it somewhere else, this script will clobber the contents of that repository. Also, try a few themes before you add content. I found that some of the theme did not play well with blogdown on GitHub. Read more →

A Plain Markdown Post

This is a post written in plain Markdown (*.md) instead of R Markdown (*.Rmd). The major differences are: You cannot run any R code in a plain Markdown document, whereas in an R Markdown document, you can embed R code chunks (```{r}); A plain Markdown post is rendered through Blackfriday, and an R Markdown document is compiled by rmarkdown and Pandoc. There are many differences in syntax between Blackfriday’s Markdown and Pandoc’s Markdown. Read more →