Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
R 3.1.1 was released a few days ago, and as part of the policy we are trying to follow for Rcpp11
releases, here is Rcpp11
3.1.1. Sorry for the 12 days delay, but I was away in California, and Rcpp11 travelled with me, so I could not properly test the package. I have now tested the package extensively on these combinations:
OS X/clang
at home.Ubuntu/gcc 4.6.3
through travisWindows/gcc 4.6.3
under duress
Here is the extract of the NEWS.md
file for this release:
Rcpp11 3.1.1
sugar
sum
now supports complex sugar vector expressionssugar
mean
implements the double pass algorithm fornumeric
andcomplex
cases (#134)more C++ support for Rcomplex:
Rcomplex& operator+=( Rcomplex&, const Rcomplex& )
Rcomplex operator/( Rcomplex, double )
Internal refactoring/simplification of all api classes. Api classes are now parameterized by a class for the storage policy instead of a template as before.
Dots
andNamedDots
handle the border case when...
is missing (#123)If the macro
RCPP_DO_BOUNDS_CHECKS
is defined, vector classes will perform bounds checks. This is turned off by default because it kills performance. #141Array
no longer generates spurious warnings. #154Added the concept of lazy vectors. A lazy vector is similar to a sugar expression, but it only knows how to apply itself, i.e. we cannot call
operator[](int)
on it. This is used for implementation ofcreate
andfuse
create
can now also be used as a free function. For example:IntegerVector x = create(1,2,3) ;
. When used as a free function,create
chooses to create a lazy vector of the highest type. For example,create(1,2.0)
makes a lazy vector of typeREALSXP
(what makes sense fordouble
).Added the
list
function. It takes a variadic list of arguments and makes an R list from it. This uses the same underlying implementation asList::create
but is nicer to use.mapply
was reimplemented using variadic templates.mapply
now accepts a function as first parameter, then a variable number of sugar expressions.Array
gains afill
method to initialize all its data to the same value.is<>
was broken.Initial implementation of
ListOf
.ListOf<T>
is similar toList
but it only exposes constructors that takeT
objects and methods that maintain this requirement. The implementation differs from Kevin Ushey’s implementation in Rcpp, which IMHO tries to do too much.New sugar functions
Filter
,Reduce
andMap
(synonym ofmapply
) #140.New function
Negate
,Compose
for intial attempt at functional programming and function composition #140.Support for long vector has been added. Vectors are now indexed by the
R_xlen_t
type (64 bit on 64 bit platforms).The header
<Rcpp11>
has been added. It just includes<Rcpp.h>
, but I like it better to have#include <Rcpp11>
The
Rcpp11
namespace has been added as an alias toRcpp
. So that we can typeusing namespace Rcpp11 ;
variadic trailing arguments can now be used in
sapply
(#189)Logical vectors internally use the
Rboolean
type instead ofint
.Added the syntax
x != NA
to test if something is not the missing value.New sugar function
import_n
so that we can doimport_n( iterator, n )
instead ofimport( iterator, iterator + n) ;
New sugar function
enumerate
(#153).
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.