We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it will be much easier to share and improve those functions, if they are within a package. Up till the 24th December I will present one function each day from
helfRlein. So, on the 10th day of Christmas my true love gave to me…
What can it do?
This little helper is just a convenience function. It is simply the same as the negated
%in% operator, as you can see below. But in my opinion, it increases the readability of the code.
all.equal( c(1,2,3,4) %nin% c(1,2,5), !c(1,2,3,4) %in% c(1,2,5))  TRUE
Also, this operator has made it into a few other packages as well – as you can read here.
Have a merry advent season!