Publications by gluc

R … three dots ellipsis

02.02.2015

If you have used R before, then you surely have come across the three dots, e.g.print(x, ...)In technical language, this is called an ellipsis. And it means that the function is designed to take any number of named or unnamed arguments. By the way, the ellipsis is not a specialty of R. Other programming languages have the same or a similar concep...

2050 sym R (1790 sym/12 pcs)

What is an R environment?

02.02.2015

For many years as an R user, I didn’t care about environments. To run your statistics, you only very rarely need them. Until you come accross your first environmental concerns… For me, that was in relation with reference classes and R6 objects. Suddenly, everybody was talking about env, and I didn’t have a clue. So, here’s a primer. For a...

2139 sym R (529 sym/3 pcs)

Continuous Integration for R packages

21.02.2015

What is git? Git is a version control system, and the best I have worked with for that matter. 15 years ago, I was happy when my company decided to migrate from RCS to SVN. Branching became simple, and many daily problems just disappeared. So I shuned other source control versioning systems for a long time. Until I came across git, that is. git i...

3560 sym R (154 sym/2 pcs)

magrittr

16.03.2015

F# made pipes popular among data scientists, and the magrittr package brought pipes to R. For example, with magrittr, you could write:my.data %>% my.functioninstead ofmy.function(my.data)For example:mean(rnorm(100))becomes:rnorm(100) %>% meanor even (to take it to the extreme):100 %>% rnorm %>% meanThis doesn’t look like a revolution, but in pr...

1715 sym R (584 sym/9 pcs) 2 img

Remember the RSeek!

25.03.2015

Most people probably know this, but sometimes even I forget that there is the great Rseek.org. Purisitc as google itself, it works basically like a filter on google searches, to return only R-relevant content. This is very useful if you need to perform a specific task. For example, recently I was looking for an ID3 implementation (a classificatio...

977 sym

R package data.tree published to CRAN

10.04.2015

Today, data.tree 0.1.6 was published to CRAN. It lets you manage hierarchical data, convert to and from data.frame, and OO-style decorate nodes in your tree with functions and attributes. Read the ID3 example, or the introduction vignette for more information. Also, report ideas, bugs, problems, etc. to the github repository. The post R package d...

789 sym

Write an R Journal article with knitr

11.04.2015

R Journal The R Journal publishs peer-reviewed short to medium length articles covering topics that might be of interest to users or developers of R. It is a welcome platform to spread word of new packages. As most academic journals, it has strict guidelines regarding the format of submitted articles. Traditionally, these have been provided wit...

4246 sym R (408 sym/4 pcs) 8 img

ID3 Classification using data.tree

17.04.2015

Introduction About this vignette What is ID3? Feature Selection Purity and Entropy Information Gain The ID3 algorithm Pseudo code Implementation in R with the data.tree package Training with data Prediction The prediction method Using the prediction method While preparing this example, I asked my nine-year-old daughter, “Anaïs, imagine...

6735 sym R (3116 sym/24 pcs) 2 img

How to convert an R data.tree to JSON

18.04.2015

I have recently published the data.tree R package to CRAN. It provides OO-style tree building, with standard tree traversal methods. Read the vignette about data.tree features if you are interested, or the one explaining how to use data.tree for classification models. I’ve been asked how to convert a data.tree to an XML or JSON. So here’s the...

1141 sym R (1557 sym/1 pcs)

Convert data.tree to and from list, json, networkD3, and more

15.05.2015

The data.tree package provides a facility to create and manage tree structures in R, and to decorate nodes with methods. This comes in handy for many algorithms. For an example, see here. Or read up the vignettes in the package, e.g. from CRAN. In the last post, I showed how we can write a custom converter to convert a data.tree Node to a JSON s...

2171 sym R (2754 sym/11 pcs)