Building and testing R packages with latest R-Devel

If you want to submit your R package to CRAN, you need to ensure that all R checks will be executed successfully without a warning for the current and the devel version of R.

And not only that, as a package maintainer, you also need to ensure that your submitted packages will still work with upcoming R versions. If you are using native code in your package which needs compilation (e.g. C/C++), the whole process is even getting more complex, since you need to ensure that the compilation of the code works on different systems (debian, fedora, windows (32 and 64 bit), solaris (sic), and osx) and with different compilers (gcc, clang).

But, for the moment let’s focus on setting up an environment to check your package against the latest R-Devel version to be able to reproduce and resolve issues.

Read More

R package naming conventions

Naming something in general, and especially in R, can be quite tricky, because there seems to be no real consensus about naming conventions for packages and functions. Since I am currently in the process of releasing an R package, I wanted to get more recent data about the usage of different naming styles for R packages and package functions. My hypothesis was that the users most probably are familiar with the naming conventions which are used by the most downloaded R packages and therefore it might make sense to adopt these naming styles.

For my small analysis project I distinguished between the following naming styles:

  • lowercase (lc)
  • lowerCamelCase (lCC)
  • UpperCamelCase (UCC)
  • name_with_underscores (us / snake_case)
  • name.with.dots (dot)

Read More

Samsung Galaxy S6 Update - Stagefright fixed?

Today a new software update arrived (using Vodafone as provider) for the Samsung Galaxy S6 with the name G920FXXU2COH4 / G920FTEF2COH1 / G920FXXU2COH2. While a quick internet search didn’t reveal the purpose of the update, it seems that the Stagefright vulnerability finally has been fixed. I’ve tested the vulnerability to Stagefright attacks with Zimperium’s Stagefright Detector, as you can see in the following picture.

Read More

Discovered music #1

Since it is always interesting to stumble over some (rather unknown) tunes while surfing the web, I thought it might be a nice addition to this blog to share (and archive) some discovered songs or albums. The following pieces mainly fit in the electronic genre and are well suited as a musical backing of a coding marathon. Further more some albums can also be bought through bandcamp or are available on soundcloud.

Tor - Drum Therapy

  • Genre: Electronic, Downtempo
  • Favorite Track: Glass & Stone

Read More

R - Pitfalls in converting a factor to a numeric value

Sometimes when you’ve done some data manipulation or read in a new file, it might happen that a numerical attribute, like an id, is stored as a factor. Let’s have a look at the following example: Here I simply defined an vector of numbers (e.g. ids), and converted the values to factors.

id <- factor(seq(10000, 20000, 1))
> str(id)
 Factor w/ 10001 levels "10000","10001",..: 1 2 3 4 5 6 7 8 9 10 ...

Read More