LONDON Britain has killed two of its own nationals who had been fighting for Islamic State (IS) and plotting attacks on British soil, in its first air strike in Syria, Prime Minister David Cameron said on Monday.
Germany will spend around $6.6 billion to cope with some 800,000 migrants and refugees expected to have crossed into the country by the end of 2015, the government said early Monday.
But the package framework is not just suited to allow experts to distribute their statistical approaches and techniques to a wide audience via CRAN, but it also allows us to collect functions we define ourselves in a single place.
When writing functions and creating packages it is extremely important to write your syntax in an environment that has functionalities beyond the basic R GUI. Many people use RStudio, which I can also wholeheartedly recommend. A main pro of RStudio is that it is a cross-platform IDE, meaning that your R-Code will look and feel the same on a Windows machine and on a Mac Book (which can be incredibly helpful if you’re teaching R). The same goes for Emacs with ESS. Most other alternatives are more OS-specific: Notepad Plus with the NppToR add-on is a good choice on Windows and gedit with the rgedit extension is what I can recommend if you’re running Ubuntu Linux. No matter which of these you choose, they all give you much more information about your code than standard R and – in some cases – come with a plethora of debugging functionalities which are quite handy for writing your own packages.
At this point I’ll assume that you have R installed on your machine. If you don’t, follow these instructions on the official site. For creating your own packages it is important that you not only install the base version of R, but also the developer version via terminal.
Additionally, there are two packages I would strongly recommend using when you are building your own R packages: devtools and roxygen2. The problem with using the former is that it requires some additional libraries to be installed on your machine. What you can do is to install all the necessary libraries.
If you are running Windows, the initial setup is a bit more complicated. But, with a few tweaks it is possible to make the package building work just fine. Because I run Ubuntu on my machine I am no expert with setting this up but following this excellent guide by Steven Mosher, I was able to make it work in 10 minutes on Windows 8.1 (and it still works despite the upgrade to Windows 10).
If you are running Mac OS X you don’t need to take any extra steps in your R setup. It should work straight out of the box – but be aware that the current R version (3.2.2 as of this writing) will only run on Mac OS X 10.9 or higher.
So, now that we’ve gotten this out of the way, we can start taking the first steps towards building our own R package.
Next time, we’ll create some functions and start the initial package build.
Today I am happy to announce a new lesson for my free email course Learn to Map Census Data in R. This lesson explains how to get and map historic census data in R. While I had intended this lesson to only go to new signups, it looks like my email provider sent it (along with resending the conclusion email!) to anyone who ever took the course. I apologize for this! For reference, here is the lesson: