Writing manuscripts in Rstudio, easy citations

Intro and setup This is a simple explanation of how to write a manuscript in RStudio. Writing a manuscript in RStudio is not ideal, but it has gotten better over time. It is now relatively easy to add citations to documents in RStudio. **The goal is not think about formatting, and citations, but to write the manuscript and add citations on the fly with a nice visual help. ** This tutorial explains how to link Zotero (a reference manager) to your project folder and how to easily add citations. [Read More]

Plotting a map with ggplot2, color by tile

Introduction Last week I was playing with creating maps using R and GGPLOT2. As I was learning I realized information about creating maps in ggplot is scattered over the internet. So here I combine all that knowledge. So if something is absolutely wrong/ ridiculous / stupid / slightly off or not clear, contact me or open an issue on the github page. When you search for plotting examples you will often encounter the packages maps and mapdata. [Read More]

Submitting your first package to CRAN, my experience

I recently published my first R package to The Comprehensive R Archive Network (CRAN). It was very exciting and also quite easy. Let me walk you through my process. First a description of my brand new package: badgecreatr, then a description of steps to take for submission. Package description When you go around github looking at projects you often see these interesting images in the readme The ones you see above are from ggplot2. [Read More]

Your most valuable collaborator, future-you

I was recently at a R users meetup where Hadley Wickham talked about data wrangling. He showed some interesting stuff! Did you know that you can put a data frame into a data frame? You can make a list of data frames and add that list to your data frame. Very cool, and more useful then I thought, but that is not what I wanted to talk about. I would like to give you some tips about working with someone you will probably work with in the future. [Read More]

Creating a package for your data set

Turning your dataset into a package is very useful for reproducable research. This tutorial is for you, even if you’ve never created a package in r. Why would you turn your dataset into a package? very easy to share easy to load (library(name) is easier then load("path/to/file") or data<-read.csv("path/to/file") etc.) documentation is part of the package and will never separate from data attributes of file remain nice and easy introduction to package building What do you need to do to create a dataset package: [Read More]

Portioning projects

Often we write programs to automate things. The programs range from simple to complex. But in essence, you always do the same thing: You are trying to solve a problem. A common pitfall, at least for me, is that you start out to big. What you need to do is start simple and small, and only if your simple thing works, increase the complexity. Separate parts of the program need to be separate functions. [Read More]