The attributes vignette has been updated with documentation
on new features added over the past several releases.

Changes in Rcpp tests:

On Travis CI, all build dependencies are installed as binary
.deb packages resulting in faster tests.

Changes in Rcpp version 0.11.4 (2015-01-20)

Changes in Rcpp API:

The ListOf<T> class gains the .attr and
.names methods common to other Rcpp vectors.

The [dpq]nbinom_mu() scalar functions are now available via
the R:: namespace when R 3.1.2 or newer is used.

Add an additional test for AIX before attempting to include execinfo.h.

Rcpp::stop now supports improved printf-like syntax
using the small tinyformat header-only library (following a similar
implementation in Rcpp11)

Pairlist objects are now protected via an additional Shield<>
as suggested by Martin Morgan on the rcpp-devel list.

Sorting is now prohibited at compile time for objects of type
List, RawVector and ExpressionVector.

Vectors now have a Vector::const\_iterator that is 'const correct'
thanks to fix by Romain following a bug report in rcpp-devel by Martyn Plummer.

The mean() sugar function now uses a more robust two-pass
method, and new unit tests for mean() were added at the same time.

The mean() and var() functions now support all core
vector types.

The setequal() sugar function has been corrected via
suggestion by Qiang Kou following a bug report by Søren Højsgaard.

The macros major, minor, and makedev no longer leak
in from the (Linux) system header sys/sysmacros.h.

The push_front() string function was corrected.

Changes in Rcpp Attributes:

Only look for plugins in the package's namespace
(rather than entire search path).

Also scan header files for definitions of functions to be considerd
by Attributes.

Correct the regular expression for source files which are scanned.

Changes in Rcpp unit tests

Added a new binary test which will load a pre-built package to
ensure that the Application Binary Interface (ABI) did not change; this
test will (mostly or) only run at Travis where we have reasonable control
over the platform running the test and can provide a binary.

New unit tests for sugar functions mean, setequal and
var were added as noted above.

Changes in Rcpp Examples:

For the (old) examples ConvolveBenchmarks and OpenMP,
the respective Makefile was renamed to GNUmakefile to please
R CMD check as well as the CRAN Maintainers.

Changes in Rcpp version 0.11.3 (2014-09-27)

Changes in Rcpp API:

The deprecation of RCPP_FUNCTION_* which was announced with
release 0.10.5 last year is proceeding as planned, and the file
macros/preprocessor_generated.h has been removed.

Timer no longer records time between steps, but times from
the origin. It also gains a get_timers(int) methods that
creates a vector of Timer that have the same origin. This is modelled
on the Rcpp11 implementation and is more useful for situations where
we use timers in several threads. Timer also gains a constructor
taking a nanotime_t to use as its origin, and a origin method.
This can be useful for situations where the number of threads is not known
in advance but we still want to track what goes on in each thread.

A cast to bool was removed in the vector proxy code as
inconsistent behaviour between clang and g++ compilations was noticed.

Changes in Rcpp version 0.11.2 (2014-06-06)

Changes in Rcpp API:

Implicit conversions, e.g. between NumericVector and
IntegerVector, will now give warnings if you use
\#define RCPP_WARN_ON_COERCE before including the Rcpp
headers.

Templated List containers, ListOf<T>, have been
introduced. When subsetting such containers, the return is assumed
to be of type T, allowing code such as
ListOf<NumericVector> x; NumericVector y = x[0] + x[1] + x[2].

In a number of instances, returned results are protected and/or cast
more carefully.

Changes in Rcpp Attributes

Trailing line comments are now stripped by the attributes
parser. This allows the parser to handle C++ source files
containing comments inline with function arguments.

The USE_CXX1X environment variable is now defined by
the cpp11 plugin when R >= 3.1. Two additional plugins have been
added for use with C++0x (eg when using g++ 4.6.* as on Windows)
as well as C++1y for compilers beginning to support the next
revision of the standard; additional fallback is provided for
Windows.

compileAttributes() now also considers Imports: which
may suppress a warning when running Rcpp.package.skeleton().

Changes in Rcpp version 0.11.1 (2014-03-13)

Add missing default constructor to Reference class that was
omitted in the header-only rewrite

Fixes for NA and NaN handling of the
IndexHash class, as well as the vector .sort()
method. These fixes ensure that sugar functions depending on
IndexHash (i.e. unique(), sort_unique(),
match()) will now properly handle NA and NaN
values for numeric vectors.

Rcpp vectors gain a subsetting method – it is now possible
to subset an Rcpp vector using CharacterVectors (subset
by name), LogicalVectors (logical subsetting), and
IntegerVectors (0-based index subsetting). Such subsetting
will also work with Rcpp sugar expressions, enabling expressions
such as x[ x > 0].

Comma initialization (e.g.
CharacterVector x = "a", "b", "c";, has been disabled, as
it causes problems with the behavior of the = operator with
Rcpp::Lists. Users who want to re-enable this functionality
can use #define RCPP_COMMA_INITIALIZATION, but be aware of
the above caveat. The more verbose
CharacterVector x = CharacterVector::create("a", "b", "c")
is preferred.

Fix behavior with attributes parsing of ::create for default
arguments, and also allow constructors of a given size
(e.g. NumericVector v = NumericVector(10)) gives a default
value of numeric(10) at the R level). Also make NAs preserve
type when exported to R (e.g. NA_STRING as a default argument
maps to NA_character_ at the R level)

Changes in Rcpp modules

Corrected the un_pointer implementation for object

Changes in Rcpp version 0.11.0 (2014-02-02)

Changes in Rcpp API:

Functions provided/used by Rcpp are now registered
with R and instantiated by client package alleviating the new for
explicit linking against libRcpp which is therefore no
longer created.

Updated the Rcpp.package.skeleton() function accordingly.

New class StretchyList for pair lists with fast addition of
elements at the front and back. This abstracts the 3 functions
NewList, GrowList and Insert used in various
packages and in parsers in R.

The sugar table function did not handle NAs and NaNs properly
for numeric vectors. Fixed and tests added.

The internal coercion mechanism mapping numerics to strings has
been updated to better match R (specifically with Inf, -Inf,
and NaN.)

Applied two bug fixes to Vector sort() and RObject
definition spotted and corrected by Kevin Ushey

New checkUserInterrupt() function that provides a C++ friendly
implementation of R_CheckUserInterrupt.

Changes in Rcpp attributes:

Embedded R code chunks in sourceCpp are now executed within
the working directory of the C++ source file.

Embedded R code chunks in sourceCpp can now be disabled.

Changes in Rcpp documentation:

The Rcpp-FAQ and Rcpp-package vignettes have been updated and expanded.

Vignettes are now typeset with grey background for code boxes.

The bibtex reference file has been update to reflexct
current package versions.

Changes in Rcpp unit tests:

The file tests/doRUnit.R was rewritten following the
pattern deployed in RProtoBuf which is due to Murray Stokely

The function test() was rewritten; it provides an
easy entry point to running unit tests of the installed package

Changes in Rcpp version 0.10.6 (2013-10-27)

Changes in Rcpp API:

The function exposeClass takes a description of the
constructors, fields and methods to be exposed from a C++
class, and writes C++ and R files in the package. Inherited
classes can be dealt with, but require data type information.
This approach avoids hand-coding module files.

Two missing is<>() templates for
CharacterVector and CharacterMatrix have been added,
and some tests for is_na() and is_finite() have been
corrected thanks to Thomas Tse.

Changes in R code:

Export linking helper function LdFlags as well as
RcppLdFlags.

Function Rcpp.package.skeleton() no longer passes a
namespace argument on to package.skeleton()

Changes in R setup:

Raise requirement for R itself to be version 3.0.0 or later
as needed by the vignette processing

Changes in Rcpp attributes:

sourceCpp now correctly binds to Rtools 3.0 and 3.1

Changes in Rcpp version 0.10.5 (2013-09-28)

Changes in R code:

New R function demangle that calls the DEMANGLE macro.

New R function sizeof to query the byte size of a type. This
returns an object of S3 class bytes that has a print method
showing bytes and bits.

Changes in Rcpp API:

Add defined(__sun) to lists of operating systems to
test for when checking for lack of backtrace() needed for
stack traces.

as<T*>, as<const T*>, as<T&> and
as<const T&> are now supported, when
T is a class exposed by modules, i.e. with RCPP_EXPOSED_CLASS

DoubleVector as been added as an alias to
NumericVector

New template function is<T> to identify if an R object
can be seen as a T. For example is<DataFrame>(x).
This is a building block for more expressive dispatch in various places
(modules and attributes functions).

wrap can now handle more types, i.e. types that iterate over
std::pair<const KEY, VALUE> where KEY can be converted to a
String and VALUE is either a primitive type (int, double)
or a type that wraps. Examples :

std::map<int, double> : we can make a String from an int,
and double is primitive

boost::unordered_map<double, std::vector<double> >: we can make
a String from a double and std::vector<double> can wrap itself

Other examples of this are included at the end of the wrap unit test
file (runit.wrap.R and wrap.cpp).

wrap now handles containers of classes handled by modules. e.g.
if you expose a class Foo via modules, then you can wrap
vector<Foo>, ... An example is included in the wrap unit test
file

RcppLdFlags(), often used in Makevars files of
packages using Rcpp, is now exported from the package namespace.

Changes in Attributes:

Objects exported by a module (i.e. by a RCPP_MODULE call
in a file that is processed by sourceCpp) are now directly
available in the environment. We used to make the module object
available, which was less useful.

A plugin for openmp has been added to support use of OpenMP.

Rcpp::export now takes advantage of the more flexible
as<>, handling constness and referenceness of the input types.
For users, it means that for the parameters of function exported by modules,
we can now use references, pointers and const versions of them.
The file Module.cpp file has an example.

No longer call non-exported functions from the tools package

No longer search the inline package as a fallback when loading
plugins for the the Rcpp::plugins attribute.

Changes in Modules:

We can now expose functions and methods that take
T& or const T& as arguments. In these situations
objects are no longer copied as they used to be.

Changes in sugar:

is_na supports classes DatetimeVector and
DateVector

Changes in Rcpp documentation:

The vignettes have been moved from inst/doc/ to the
vignettes directory which is now preferred.

The appearance of the vignettes has been refreshed by
switching to the Bistream Charter font, and microtype package.

Deprecation of RCPP_FUNCTION_*:

The macros from the preprocessor_generated.h file
have been deprecated. They are still available, but they print a
message in addition to their expected behavior.

The macros will be permanently removed in the first Rcpp
release after July 2014.

Users of these macros should start replacing them with more
up-to-date code, such as using 'Rcpp attributes' or 'Rcpp modules'.

Changes in Rcpp version 0.10.4 (2013-06-23)

Changes in R code: None beyond those detailed for Rcpp Attributes

Changes in Rcpp attributes:

Fixed problem whereby the interaction between the gc and the
RNGScope destructor could cause a crash.

Lookup plugins in inline package if they aren't found
within the Rcpp package.

Disallow compilation for files that don't have extensions
supported by R CMD SHLIB

Changes in Rcpp API:

The DataFrame::create set of functions has been reworked
to just use List::create and feed to the DataFrame
constructor

The operator-() semantics for Date and
Datetime are now more inline with standard C++ behaviour;
with thanks to Robin Girard for the report.

RNGScope counter now uses unsigned long rather than int.

Vector<*>::erase(iterator, iterator) was fixed. Now
it does not remove the element pointed by last (similar to what is
done on stl types and what was intended initially). Reported on
Rcpp-devel by Toni Giorgino.

New function is_finite and is_infinite that
reproduces the behavior of R's is.finite and
is.infinite functions

Changes in Rcpp build tools:

Fix by Martyn Plummer for Solaris in handling of
SingleLogicalResult.

The src/Makevars file can now optionally override the
path for /usr/bin/install_name_tool which is used on OS X.

Vignettes are trying harder not to be built in parallel.

Changes in Rcpp documentation:

Updated the bibliography in Rcpp.bib (which is also
sourced by packages using Rcpp).

Updated the THANKS file.

Planned Deprecation of RCPP_FUNCTION_*:

The set of macros RCPP_FUNCTION_ etc ... from the
preprocessor_generated.h file will be deprecated in the next version
of Rcpp, i.e they will still be available but will generate some
warning in addition to their expected behavior.

In the first release that is at least 12 months after this announcement, the
macros will be removed from Rcpp.

Users of these macros (if there are any) should start replacing them
with more up to date code, such as using Rcpp attributes or Rcpp
modules.

Changes in Rcpp version 0.10.3 (2013-03-23)

Changes in R code:

Prevent build failures on Windowsn when Rcpp is installed
in a library path with spaces (transform paths in the same manner
that R does before passing them to the build system).

Changes in Rcpp attributes:

Rcpp modules can now be used with sourceCpp

Standalone roxygen chunks (e.g. to document a class) are now
transposed into RcppExports.R

Added Rcpp::plugins attribute for binding
directly to inline plugins. Plugins can be registered using
the new registerPlugin function.

Added built-in cpp11 plugin for specifying
the use of C++11 in a translation unit

The very central use of R API R_PreserveObject and
R_ReleaseObject has been replaced by a new system based on the
functions Rcpp_PreserveObject, Rcpp_ReleaseObject and Rcpp_ReplaceObject
which shows better performance and is implemented using a generic vector
treated as a stack instead of a pairlist in the R
implementation. However, as this preserve / release code is still
a little rough at the edges, a new #define is used (in config.h)
to disable it for now.

Platform-dependent code in Timer.cpp now recognises a few
more BSD variants thanks to contributed defined() test suggestions

Support for wide character strings has been added throughout the
API. In particular String, CharacterVector, wrap and as are aware of
wide character strings

Changes in Rcpp version 0.10.2 (2012-12-21)

Changes in Rcpp API:

Source and header files were reorganized and consolidated so
that compile time are now significantly lower

Added additional check in Rstreambuf deletetion

Added support for clang++ when using libc++,
and for anc icpc in std=c++11 mode, thanks to a
patch by Yan Zhou

New class Rcpp::String to facilitate working with a single
element of a character vector

Rcpp::interfaces attribute to specify the external bindings
compileAttributes() should generate (defaults to R-only but a
C++ include file using R_GetCCallable can also be generated)

New vignette "Rcpp-attribute"

Rcpp modules feature set has been expanded:

Functions and methods can now return objects from classes that
are exposed through modules. This uses the make_new_object template
internally. This feature requires that some class traits are declared
to indicate Rcpp's wrap/as system that these classes are covered
by modules. The macro RCPP_EXPOSED_CLASS and RCPP_EXPOSED_CLASS_NODECL
can be used to declared these type traits.

Classes exposed through modules can also be used as parameters
of exposed functions or methods.

Exposed classes can declare factories with ".factory". A factory
is a c++ function that returns a pointer to the target class. It is
assumed that these objects are allocated with new on the factory. On the
R side, factories are called just like other constructors, with the
"new" function. This feature allows an alternative way to construct
objects.

"converter" can be used to declare a way to convert an object
of a type to another type. This gets translated to the appropriate
"as" method on the R side.

Inheritance. A class can now declare that it inherits from
another class with the .derives<Parent>( "Parent" ) notation. As a result
the exposed class gains methods and properties (fields) from its
parent class.

New sugar functions:

which_min implements which.min. Traversing the sugar expression
and returning the index of the first time the minimum value is found.

which_max idem

unique uses unordered_set to find unique values. In particular,
the version for CharacterVector is found to be more efficient than
R's version

sort_unique calculates unique values and then sorts them.

Improvements to output facilities:

Implemented sync() so that flushing output streams works

Added Rcerr output stream (forwarding to
REprintf)

Provide a namespace 'R' for the standalone Rmath library so
that Rcpp users can access those functions too; also added unit tests

Development releases sets variable RunAllRcppTests to yes to
run all tests (unless it was alredy set to 'no'); CRAN releases do
not and still require setting – which helps with the desired CRAN
default of less testing at the CRAN server farm.

Changes in Rcpp version 0.9.15 (2012-10-13)

Untangling the clang++ build issue about the location of the
exceptions header by directly checking for the include file – an
approach provided by Martin Morgan in a kindly contributed patch
as unit tests for them.

The Date and Datetime types now correctly
handle NA, NaN and Inf representation; the
Date type switched to an internal representation via double

Added Date and Datetime unit tests for the new
features

An additional PROTECT was added for parsing exception
messages before returning them to R, following a report by Ben North

Changes in Rcpp version 0.9.14 (2012-09-30)

Added new Rcpp sugar functions trunc(), round() and signif(), as well
as unit tests for them

Be more conservative about where we support clang++ and the inclusion
of exception_defines.h and prevent this from being attempted on OS X
where it failed for clang 3.1

Corrected a typo in Module.h which now again permits use of finalizers

Small correction for (unexported) bib() function (which provides a path
to the bibtex file that ships with Rcpp)

Converted NEWS to NEWS.Rd

Changes in Rcpp version 0.9.13 (2012-06-28)

Truly corrected Rcpp::Environment class by having default constructor
use the global environment, and removing the default argument of
global environment from the SEXP constructor

Added tests for clang++ version to include bits/exception_defines.h
for versions 3.0 or higher (similar to g++ 4.6.0 or later), needed to
include one particular exceptions header

Made more regression tests conditional on the RunAllRcppTests to come
closer to the CRAN mandate of running tests in sixty seconds

Updated unit test wrapper tests/doRUnit.R as well as unitTests/runTests.R

Changes in Rcpp version 0.9.12 (2012-06-23)

Corrected Rcpp::Environment class by removing (empty) ctor following
rev3592 (on May 2) where default argument for ctor was moved

Unit testing now checks for environment variable RunAllRcppTests being
set to "yes"; otherwise some tests are skipped. This is arguably not
the right thing to do, but CRAN maintainers insist on faster tests.

Unit test wrapper script runTests.R has new option –allTests to set
the environment variable

The cleanup script now also considers inst/unitTests/testRcppClass/src

Changes in Rcpp version 0.9.11 (2012-06-22)

New member function for vectors (and lists etc) containsElementNamed()
which returns a boolean indicating if the given element name is present

Updated the Rcpp.package.skeleton() support for Rcpp modules by
carrying functions already present from the corresponding unit test
which was also slightly expanded; and added more comments to the code

Rcpp modules can now be loaded via loadRcppModules() from .onLoad(),
or via loadModule("moduleName") from any R file

New Rcpp-FAQ entry on simple way to set compiler option for cxxfunction

Changes in Rcpp version 0.9.9 (2012-12-25)

Reverting the 'int64' changes from release 0.9.8 which adversely
affect packages using Rcpp: We will re-apply the 'int64' changes in a
way which should cooperate more easily with 'long' and 'unsigned long'.

Unit test output directory fallback changed to use Rcpp.Rcheck

Conditioned two unit tests to not run on Windows where they now break
whereas they passed before, and continue to pass on other OSs

Changes in Rcpp version 0.9.8 (2011-12-21)

wrap now handles 64 bit integers (int64_t, uint64_t) and containers
of them, and Rcpp now depends on the int64 package (also on CRAN).
This work has been sponsored by the Google Open Source Programs
Office.

Added setRcppClass() function to create extended reference classes
with an interface to a C++ class (typically via Rcpp Module) which
can have R-based fields and methods in addition to those from the C++.

Applied patch by Jelmer Ypma which adds an output stream class
'Rcout' not unlike std::cout, but implemented via Rprintf to
cooperate with R and its output buffering.

Changes in Rcpp version 0.9.7 (2011-09-29)

Applied two patches kindly provided by Martyn Plummer which provide
support for compilation on Solaris using the SunPro compiler

Minor code reorganisation in which exception specifiers are removed;
this effectively only implements a run-time (rather than compile-time)
check and is generally seen as a somewhat depreated C++ idiom. Thanks
to Darren Cook for alerting us to this issue.

New example 'OpenMPandInline.r' in the OpenMP/ directory, showing how
easily use OpenMP by modifying the RcppPlugin output

New example 'ifelseLooped.r' showing Rcpp can accelerate loops that may
be difficult to vectorise due to dependencies

New example directory examples/Misc/ regrouping the new example as
well as the fibonacci example added in Rcpp 0.9.6

New Rcpp-FAQ example warning of lossy conversion from 64-bit long
integer types into a 53-bit mantissa which has no clear fix yet.

New unit test for accessing a non-exported function from a namespace

Changes in Rcpp version 0.9.6 (2011-07-26)

Added helper traits to facilitate implementation of the RcppEigen
package: The is_eigen_base traits identifies if a class derives from
EigenBase using SFINAE; and new dispatch layer was added to wrap() to
help RcppEigen

XPtr now accepts a second template parameter, which is a function
taking a pointer to the target class. This allows the developper to
supply his/her own finalizer. The template parameter has a default
value which retains the original behaviour (calling delete on the
pointer)

New example RcppGibbs, extending Sanjog Misra's Rcpp illustration of
Darren Wilkinson's comparison of MCMC Gibbs Sampler implementations;
also added short timing on Normal and Gaussian RNG draws between Rcpp
and GSL as R's rgamma() is seen to significantly slower

New example on recursively computing a Fibonacci number using Rcpp and
comparing this to R and byte-compiled R for a significant speed gain

Changes in Rcpp version 0.9.5 (2011-07-05)

New Rcpp-FAQ examples on using the plugin maker for inline's
cxxfunction(), and on setting row and column names for matrices

New sugar functions: mean, var, sd

Minor correction and extension to STL documentation in Rcpp-quickref

wrap() is now resilient to NULL pointers passed as in const char *

loadRcppModules() gains a "direct" argument to expose the module instead
of exposing what is inside it

Suppress a spurious warning from R CMD check on packages created with
Rcpp.package.skeleton(..., module=TRUE)

Some fixes and improvements for Rcpp sugar function 'rlnorm()'

Beginnings of new example using OpenMP and recognising user interrupts

Changes in Rcpp version 0.9.4 (2011-04-12)

New R function "loadRcppModules" to load Rcpp modules automatically
from a package. This function must be called from the .onLoad function
and works with the "RcppModules" field of the package's DESCRIPTION file

The Modules example wrapped the STL std::vector received some editing
to disambiguate some symbols the newer compilers did not like

Coercing of vectors of factors is now done with an explicit callback
to R's "as.character()" as Rf_coerceVector no longer plays along

A CITATION file for the published JSS paper has been added, and
references were added to Rcpp-package.Rd and the different vignettes

Changes in Rcpp version 0.9.3 (2011-04-05)

Fixed a bug in which modules code was not behaving when compiled
twice as can easily happen with inline'ed version

Exceptions code includes exception_defines.h only when g++ is 4.5 or
younger as the file no longer exists with g++-4.6

The documentation Makefile now uses the $R_HOME environment variable

The documentation Makefile no longer calls clean in the all target

C++ conformance issue found by clang/llvm addressed by re-ordering
declarations in grow.h as unqualified names must be declared before
they are used, even when used within templates

The 'long long' typedef now depends on C++0x being enabled as this
was not a feature in C++98; this suppresses a new g++-4.5 warning

The Rcpp-introduction vignette was updated to the forthcoming JSS paper

Changes in Rcpp version 0.9.2 (2011-02-23)

The unitTest runit.Module.client.package.R is now skipped on older OS
X releases as it triggers a bug with g++ 4.2.1 or older; OS X 10.6 is
fine but as it no longer support ppc we try to accomodate 10.5 too
Thanks to Simon Urbanek for pinning this down and Baptiste Auguie
and Ken Williams for additonal testing

RcppCommon.h now recognises the Intel Compiler thanks to a short
patch by Alexey Stukalov; this turns off Cxx0x and TR1 features too

Three more setup questions were added to the Rcpp-FAQ vignette

One question about RcppArmadillo was added to the Rcpp-FAQ vignette

Changes in Rcpp version 0.9.1 (2011-02-14)

A number of internal changes to the memory allocation / protection of
temporary objects were made—with a heartfelt "Thank You!" to both
Doug Bates for very persistent debugging of Rcpp modules code, and to
Luke Tierney who added additional memory allocation debugging tools
to R-devel (which will be in R 2.13.0 and may also be in R 2.12.2)

Removed another GNU Make-specific variable from src/Makevars in order
to make the build more portable; this was noticed on FreeBSD

On *BSD, do not try to compute a stack trace but provide file and
line number (which is the same behaviour as implemented in Windows)

Changes in Rcpp version 0.9.0 (2010-12-19)

The classic API was factored out into its own package RcppClassic which
is released concurrently with this version.

If an object is created but not initialized, attempting to use
it now gives a more sensible error message (by forwarding an
Rcpp::not_initialized exception to R).

SubMatrix fixed, and Matrix types now have a nested ::Sub typedef.

New unexported function SHLIB() to aid in creating a shared library on
the command-line or in Makefile (similar to CxxFlags() / LdFlags()).

Module gets a seven-argument ctor thanks to a patch from Tama Ma.

The (still incomplete) QuickRef vignette has grown thanks to a patch
by Christian Gunning.

Added a sprintf template intended for logging and error messages.

Date::getYear() corrected (where addition of 1900 was not called for);
corresponding change in constructor from three ints made as well.

Date() and Datetime() constructors from string received a missing
conversion to int and double following strptime. The default format
string for the Datetime() strptime call was also corrected.

A few minor fixes throughout, see ChangeLog.

Changes in Rcpp version 0.8.9 (2010-11-27)

Many improvements were made in 'Rcpp modules':
- exposing multiple constructors
- overloaded methods
- self-documentation of classes, methods, constructors, fields and
functions.
- new R function "populate" to facilitate working with modules in
packages.
- formal argument specification of functions.
- updated support for Rcpp.package.skeleton.
- constructors can now take many more arguments.

The 'Rcpp-modules' vignette was updated as well and describe many
of the new features

Reference Classes no longer require a default constructor for
subclasses of C++ classes

Consistently revert to using backticks rather than shell expansion
to compute library file location when building packages against Rcpp
on the default platforms; this has been applied to internal test
packages as well as CRAN/BioC packages using Rcpp

Changes in Rcpp version 0.8.8 (2010-11-01)

New syntactic shortcut to extract rows and columns of a Matrix.
x(i,_) extracts the i-th row and x(_,i) extracts the i-th column.

Matrix indexing is more efficient. However, faster indexing is
disabled if g++ 4.5.0 or later is used.

A few new Rcpp operators such as cumsum, operator=(sugar)

Variety of bug fixes:
- column indexing was incorrect in some cases
- compilation using clang/llvm (thanks to Karl Millar for the patch)
- instantation order of Module corrected
- POSIXct, POSIXt now correctly ordered for R 2.12.0

Changes in Rcpp version 0.8.7 (2010-10-15)

As of this version, Rcpp depends on R 2.12 or greater as it interfaces
the new reference classes (see below) and also reflects the POSIXt
class reordering both of which appeared with R version 2.12.0

new Rcpp::Reference class, that allows internal manipulation of R
2.12.0 reference classes. The class exposes a constructor that takes
the name of the target reference class and a field(string) method
that implements the proxy pattern to get/set reference fields using
callbacks to the R operators "$" and "$<-" in order to preserve the
R-level encapsulation

the R side of the preceding item allows methods to be written in R as
per ?ReferenceClasses, accessing fields by name and assigning them
using "<<-". Classes extracted from modules are R reference classes.
They can be subclassed in R, and/or R methods can be defined using
the $methods(...) mechanism.

internal performance improvements for Rcpp sugar as well as an added
'noNA()' wrapper to omit tests for NA values – see the included
examples in inst/examples/convolveBenchmarks for the speedups

more internal performance gains with Functions and Environments

Changes in Rcpp version 0.8.6 (2010-09-09)

new macro RCPP_VERSION and Rcpp_Version to allow conditional compiling
based on the version of Rcpp
#if defined(RCPP_VERSION) && RCPP_VERSION >= Rcpp_Version(0,8,6)
#endif

The so-called classic API headers have been moved to a subdirectory
classic/ This should not affect client-code as only Rcpp.h was ever
included.

RcppDate now has a constructor from SEXP as well

RcppDateVector and RcppDatetimeVector get constructors from int
and both const / non-const operator(int i) functions

New API class Rcpp::InternalFunction that can expose C++ functions
to R without modules. The function is exposed as an S4 object of
class C++Function

Changes in Rcpp version 0.8.2 (2010-06-09)

Bug-fix release for suncc compiler with thanks to Brian Ripley for
additional testing.

Changes in Rcpp version 0.8.1 (2010-06-08)

This release adds Rcpp modules. An Rcpp module is a collection of
internal (C++) functions and classes that are exposed to R. This
functionality has been inspired by Boost.Python.
Modules are created internally using the RCPP_MODULE macro and
retrieved in the R side with the Module function. This is a preview
release of the module functionality, which will keep improving until
the Rcpp 0.9.0 release.
The new vignette "Rcpp-modules" documents the current feature set of
Rcpp modules.

The new vignette "Rcpp-package" details the steps involved in making a
package that uses Rcpp.

The new vignette "Rcpp-FAQ" collects a number of frequently asked
questions and answers about Rcpp.

The new vignette "Rcpp-extending" documents how to extend Rcpp
with user defined types or types from third party libraries. Based on
our experience with RcppArmadillo

Rcpp.package.skeleton has been improved to generate a package using
an Rcpp module, controlled by the "module" argument

Evaluating a call inside an environment did not work properly

cppfunction has been withdrawn since the introduction of the more
flexible cxxfunction in the inline package (0.3.5). Rcpp no longer
depends on inline since many uses of Rcpp do not require inline at
all. We still use inline for unit tests but this is now handled
locally in the unit tests loader runTests.R.
Users of the now-withdrawn function cppfunction can redefine it as:
cppfunction <- function(...) cxxfunction( ..., plugin = "Rcpp" )

Support for std::complex was incomplete and has been enhanced.

The methods XPtr<T>::getTag and XPtr<T>::getProtected are deprecated,
and will be removed in Rcpp 0.8.2. The methods tag() and prot() should
be used instead. tag() and prot() support both LHS and RHS use.

Changes in Rcpp version 0.8.0 (2010-05-17)

All Rcpp headers have been moved to the inst/include directory,
allowing use of 'LinkingTo: Rcpp'. But the Makevars and Makevars.win
are still needed to link against the user library.

Automatic exception forwarding has been withdrawn because of
portability issues (as it did not work on the Windows platform).
Exception forwarding is still possible but is now based on explicit
code of the form:
try {
// user code
} catch( std::exception& __ex__){
forward_exception_to_r( __ex___ ) ;
Alternatively, the macro BEGIN_RCPP and END_RCPP can use used to enclose
code so that it captures exceptions and forward them to R.
BEGIN_RCPP
// user code
END_RCPP

new __experimental__ macros
The macros RCPP_FUNCTION_0, ..., RCPP_FUNCTION_65 to help creating C++
functions hiding some code repetition:
RCPP_FUNCTION_2( int, foobar, int x, int y){
return x + y ;
The first argument is the output type, the second argument is the
name of the function, and the other arguments are arguments of the
C++ function. Behind the scenes, the RCPP_FUNCTION_2 macro creates an
intermediate function compatible with the .Call interface and handles
exceptions
Similarly, the macros RCPP_FUNCTION_VOID_0, ..., RCPP_FUNCTION_VOID_65
can be used when the C++ function to create returns void. The generated
R function will return R_NilValue in this case.
RCPP_FUNCTION_VOID_2( foobar, std::string foo ){
// do something with foo
The macro RCPP_XP_FIELD_GET generates a .Call compatible function that
can be used to access the value of a field of a class handled by an
external pointer. For example with a class like this:
class Foo{
public:
int bar ;
RCPP_XP_FIELD_GET( Foo_bar_get, Foo, bar ) ;
RCPP_XP_FIELD_GET will generate the .Call compatible function called
Foo_bar_get that can be used to retrieved the value of bar.
The macro RCPP_FIELD_SET generates a .Call compatible function that
can be used to set the value of a field. For example:
RCPP_XP_FIELD_SET( Foo_bar_set, Foo, bar ) ;
generates the .Call compatible function called "Foo_bar_set" that
can be used to set the value of bar
The macro RCPP_XP_FIELD generates both getter and setter. For example
RCPP_XP_FIELD( Foo_bar, Foo, bar )
generates the .Call compatible Foo_bar_get and Foo_bar_set using the
macros RCPP_XP_FIELD_GET and RCPP_XP_FIELD_SET previously described
The macros RCPP_XP_METHOD_0, ..., RCPP_XP_METHOD_65 faciliate
calling a method of an object that is stored in an external pointer. For
example:
RCPP_XP_METHOD_0( foobar, std::vector<int> , size )
creates the .Call compatible function called foobar that calls the
size method of the std::vector<int> class. This uses the Rcpp::XPtr<
std::vector<int> > class.
The macros RCPP_XP_METHOD_CAST_0, ... is similar but the result of
the method called is first passed to another function before being
wrapped to a SEXP. For example, if one wanted the result as a double
RCPP_XP_METHOD_CAST_0( foobar, std::vector<int> , size, double )
The macros RCPP_XP_METHOD_VOID_0, ... are used when calling the
method is only used for its side effect.
RCPP_XP_METHOD_VOID_1( foobar, std::vector<int>, push_back )
Assuming xp is an external pointer to a std::vector<int>, this could
be called like this :
.Call( "foobar", xp, 2L )

Rcpp now depends on inline (>= 0.3.4)

A new R function "cppfunction" was added which invokes cfunction from
inline with focus on Rcpp usage (enforcing .Call, adding the Rcpp
namespace, set up exception forwarding). cppfunction uses BEGIN_RCPP
and END_RCPP macros to enclose the user code

new class Rcpp::Formula to help building formulae in C++

new class Rcpp::DataFrame to help building data frames in C++

Rcpp.package.skeleton gains an argument "example_code" and can now be
used with an empty list, so that only the skeleton is generated. It
has also been reworked to show how to use LinkingTo: Rcpp

wrap now supports containers of the following types: long, long double,
unsigned long, short and unsigned short which are silently converted
to the most acceptable R type.

Revert to not double-quote protecting the path on Windows as this
breaks backticks expansion used n Makevars.win etc

Exceptions classes have been moved out of Rcpp classes,
e.g. Rcpp::RObject::not_a_matrix is now Rcpp::not_a_matrix

Changes in Rcpp version 0.7.12 (2010-04-16)

Undo shQuote() to protect Windows path names (which may contain
spaces) as backticks use is still broken; use of $(shell ...) works

Changes in Rcpp version 0.7.11 (2010-03-26)

Vector<> gains a set of templated factory methods "create" which
takes up to 20 arguments and can create named or unnamed vectors.
This greatly facilitates creating objects that are returned to R.

Matrix now has a diag() method to create diagonal matrices, and
a new constructor using a single int to create square matrices

Vector now has a new fill() method to propagate a single value

Named is no more a class but a templated function. Both interfaces
Named(.,.) and Named(.)=. are preserved, and extended to work also on
simple vectors (through Vector<>::create)

Applied patch by Alistair Gee to make ColDatum more robust

Fixed a bug in Vector that caused random behavior due to the lack of
copy constructor in the Vector template

Changes in Rcpp version 0.7.10 (2010-03-15)

new class Rcpp::S4 whose constructor checks if the object is an S4
object

maximum number of templated arguments to the pairlist function, the
DottedPair constructor, the Language constructor and the Pairlist
constructor has been updated to 20 (was 5) and a script has been
added to the source tree should we want to change it again

Changes in Rcpp version 0.7.9 (2010-03-12)

Another small improvement to Windows build flags

bugfix on 64 bit platforms. The traits classes (wrap_type_traits, etc)
used size_t when they needed to actually use unsigned int

fixed pre gcc 4.3 compatibility. The trait class that was used to
identify if a type is convertible to another had too many false
positives on pre gcc 4.3 (no tr1 or c++0x features). fixed by
implementing the section 2.7 of "Modern C++ Design" book.

Changes in Rcpp version 0.7.8 (2010-03-09)

All vector classes are now generated from the same template class
Rcpp::Vector<int RTYPE> where RTYPE is one of LGLSXP, RAWSXP, STRSXP,
INTSXP, REALSXP, CPLXSXP, VECSXP and EXPRSXP. typedef are still
available : IntegerVector, ... All vector classes gain methods
inspired from the std::vector template : push_back, push_front,
erase, insert

New template class Rcpp::Matrix<RTYPE> deriving from
Rcpp::Vector<RTYPE>. These classes have the same functionality
as Vector but have a different set of constructors which checks
that the input SEXP is a matrix. Matrix<> however does/can not
guarantee that the object will allways be a matrix. typedef
are defined for convenience: Matrix<INTSXP> is IntegerMatrix, etc...

New class Rcpp::Row<int RTYPE> that represents a row of a matrix
of the same type. Row contains a reference to the underlying
Vector and exposes a nested iterator type that allows use of
STL algorithms on each element of a matrix row. The Vector class
gains a row(int) method that returns a Row instance. Usage
examples are available in the runit.Row.R unit test file

New class Rcpp::Column<int RTYPE> that represents a column of a
matrix. (similar to Rcpp::Row<int RTYPE>). Usage examples are
available in the runit.Column.R unit test file

The Rcpp::as template function has been reworked to be more
generic. It now handles more STL containers, such as deque and
list, and the genericity can be used to implement as for more
types. The package RcppArmadillo has examples of this

new template class Rcpp::fixed_call that can be used in STL algorithms
such as std::generate.

RcppExample et al have been moved to a new package RcppExamples;
src/Makevars and src/Makevars.win simplified accordingly

New class Rcpp::StringTransformer and helper function
Rcpp::make_string_transformer that can be used to create a function
that transforms a string character by character. For example
Rcpp::make_string_transformer(tolower) transforms each character
using tolower. The RcppExamples package has an example of this.

Improved src/Makevars.win thanks to Brian Ripley

New examples for 'fast lm' using compiled code:
- using GNU GSL and a C interface
- using Armadillo (http://arma.sf.net) and a C++ interface
Armadillo is seen as faster for lack of extra copying

A new package RcppArmadillo (to be released shortly) now serves
as a concrete example on how to extend Rcpp to work with a modern
C++ library such as the heavily-templated Armadillo library

Added a new vignette 'Rcpp-introduction' based on a just-submitted
overview article on Rcpp

Changes in Rcpp version 0.7.7 (2010-02-14)

new template classes Rcpp::unary_call and Rcpp::binary_call
that facilitates using R language calls together
with STL algorithms.

fixed a bug in Language constructors taking a string as their
first argument. The created call was wrong.

Changes in Rcpp version 0.7.6 (2010-02-12)

SEXP_Vector (and ExpressionVector and GenericVector, a.k.a List) now
have methods push_front, push_back and insert that are templated

SEXP_Vector now has int- and range-valued erase() members

Environment class has a default constructor (for RInside)

SEXP_Vector_Base factored out of SEXP_Vector (Effect. C++ #44)

SEXP_Vector_Base::iterator added as well as begin() and end()
so that STL algorithms can be applied to Rcpp objects

CharacterVector gains a random access iterator, begin() and end() to
support STL algorithms; iterator dereferences to a StringProxy

The range based version of wrap is now exposed at the Rcpp::
level with the following interface :
Rcpp::wrap( InputIterator first, InputIterator last )
This is dispatched internally to the most appropriate implementation
using traits

a new namespace Rcpp::traits has been added to host the various
type traits used by wrap

The doxygen documentation now shows the examples

A new file inst/THANKS acknowledges the kind help we got from others

The RcppSexp has been removed from the library.

The methods RObject::asFoo are deprecated and will be removed
in the next version. The alternative is to use as<Foo>.

The method RObject::slot can now be used to get or set the
associated slot. This is one more example of the proxy pattern

Rcpp::VectorBase gains a names() method that allows getting/setting
the names of a vector. This is yet another example of the
proxy pattern.

Rcpp::DottedPair gains templated operator<< and operator>> that
allow wrap and push_back or wrap and push_front of an object

Rcpp::DottedPair, Rcpp::Language, Rcpp::Pairlist are less
dependent on C++0x features. They gain constructors with up
to 5 templated arguments. 5 was choosed arbitrarily and might
be updated upon request.

function calls by the Rcpp::Function class is less dependent
on C++0x. It is now possible to call a function with up to
5 templated arguments (candidate for implicit wrap)

added support for 64-bit Windows (thanks to Brian Ripley and Uwe Ligges)

Changes in Rcpp version 0.7.4 (2010-01-30)

new class Rcpp::Dimension to support creation of vectors with
dimensions. All vector classes gain a constructor taking a
Dimension reference.

an intermediate template class "SimpleVector" has been added. All
simple vector classes are now generated from the SimpleVector
template : IntegerVector, NumericVector, RawVector, CharacterVector
LogicalVector.

an intermediate template class "SEXP_Vector" has been added to
generate GenericVector and ExpressionVector.

the clone template function was introduced to explicitely
clone an RObject by duplicating the SEXP it encapsulates.

even smarter wrap programming using traits and template
meta-programming using a private header to be include only
RcppCommon.h

the as template is now smarter. The template now attempts to
build an object of the requested template parameter T by using the
constructor for the type taking a SEXP. This allows third party code
to create a class Foo with a constructor Foo(SEXP) to have
as<Foo> for free.

wrap becomes a template. For an object of type T, wrap<T> uses
implicit conversion to SEXP to first convert the object to a SEXP
and then uses the wrap(SEXP) function. This allows third party
code creating a class Bar with an operator SEXP() to have
wrap for free.

configure has been withdrawn. C++0x features can now be activated
by setting the RCPP_CXX0X environment variable to "yes".

new template r_cast<int> to facilitate conversion of one SEXP
type to another. This is mostly intended for internal use and
is used on all vector classes

Environment now takes advantage of the augmented smartness
of as and wrap templates. If as<Foo> makes sense, one can
directly extract a Foo from the environment. If wrap<Bar> makes
sense then one can insert a Bar directly into the environment.
Foo foo = env["x"] ; /* as<Foo> is used */
Bar bar ;
env["y"] = bar ; /* wrap<Bar> is used */

Environment::assign becomes a template and also uses wrap to
create a suitable SEXP

Many more unit tests for the new features; also added unit tests
for older API

Changes in Rcpp version 0.7.3 (2010-01-21)

New R function Rcpp.package.skeleton, modelled after
utils::package.skeleton to help creating a package with support
for Rcpp use.

indexing is now faster for simple vectors due to inlining of
the operator[] and caching the array pointer

The class Rcpp::VectorBase was introduced. All vector classes
derive from it. The class handles behaviour that is common
to all vector types: length, names, etc ...

exception forwarding is extended to compilers other than GCC
but default values are used for the exception class
and the exception message, because we don't know how to do it.

Improved detection of C++0x capabilities

Rcpp::Pairlist gains a default constructor

Rcpp::Environment gains a new_child method to create a new
environment whose parent is this

Rcpp::ExpressionVector gains a constructor taking a std::string
representing some R code to parse.

Rcpp::GenericVector::Proxy gains an assignment operator to deal
with Environment::Proxy objects

Rcpp::LdFlags() now defaults to static linking OS X, as it already
did on Windows; this default can be overridden.

Changes in Rcpp version 0.7.2 (2010-01-12)

a new benchmark was added to the examples directory
around the classic convolution example from
Writing R extensions to compare C and C++ implementations

Rcpp::CharacterVector::StringProxy gains a += operator

Rcpp::Environment gains an operator[](string) to get/set
objects from the environment. operator[] returns an object
of class Rcpp::Environment::Binding which implements the proxy
pattern. Inspired from Item 30 of 'More Effective C++'

Rcpp::Pairlist and Rcpp::Language gain an operator[](int)
also using the proxy pattern

Rcpp::RObject.attr can now be used on the rhs or the lhs, to get
or set an attribute. This also uses the proxy pattern

Inline support now provided by the update inline package, so a new
Depends on 'inline (>= 0.3.4)' replaces the code in that was
temporarily in Rcpp

Changes in Rcpp version 0.7.0 (2009-12-19)

Inline support via a modified version of 'cfunction' from Oleg
Sklyar's 'inline' package: simple C++ programs can now be compiled,
linked and loaded automagically from the R prompt, including support
for external packages. Also works on Windows (with R-tools installed)

Changes in Rcpp version 0.6.7 (2009-11-08)

New class RcppList for simple lists and data structures of different
types and dimensions, useful for RProtoBuf project on R-Forge

Started to split classes into their own header and source files

Added short README file about history and status

Small documentation markup fix thanks to Kurt; updated doxygen docs

New examples directory functionCallback/ for R function passed to C++
and being called

Changes in Rcpp version 0.6.6 (2009-08-03)

Updated Doxygen documentation

RcppParams class gains a new exists() member function

Changes in Rcpp version 0.6.5 (2009-04-01)

Small OS X build correction using R_ARCH variable

Include LGPL license as file COPYING

Changes in Rcpp version 0.6.4 (2009-03-01)

Use std:: namespace throughout instead of 'using namespace std'

Define R_NO_REMAP so that R provides Rf_length() etc in lieu of length()
to minimise clashes with other projects having similar functions

Include Doxygen documentation, and Doxygen configuration file

Minor Windows build fix (with thanks to Uwe and Simon)

Changes in Rcpp version 0.6.3 (2009-01-09)

OS X build fix with thanks to Simon

Added 'view-only' classes for int and double vector and matrix clases
as well as string vector classses, kindly suggsted / provided by
David Reiss

Add two shorter helper functions Rcpp:::CxxFlags() and
Rcpp:::LdFlags() for compilation and linker flags

Changes in Rcpp version 0.6.2 (2008-12-02)

Small but important fix for Linux builds in Rcpp:::RcppLdFlags()

Changes in Rcpp version 0.6.1 (2008-11-30)

Now src/Makevars replaces src/Makefile, this brings proper OS X
multi-arch support with thanks to Simon

Old #ifdef statements related to QuantLib removed; Rcpp is now
decoupled from QuantLib headers yet be used by RQuantLib

Added RcppLdPath() to return the lib. directory patch and on Linux
the rpath settings

Added new RcppVectorExample()

Augmented documentation on usage in Rcpp-package.Rd

Changes in Rcpp version 0.6.0 (2008-11-05)

New maintainer, taking over RcppTemplate (which has been without an
update since Nov 2006) under its initial name Rcpp

New files src/Makefile{,.win} including functionality from both
configure and RcppSrc/Makefile; we now build two libraries, one for
use by the package which also runs the example, and one for users to
link against, and removed src/Makevars.in

Files src/Rcpp.{cpp,h} moved in from ../RcppSrc

Added new class RcppDatetime corresponding to POSIXct in with full
support for microsecond time resolution between R and C++

Several new manual pages added

Removed configure{,.in,.win} as src/Makefile* can handle this more
easily