1\name{NEWS} 2\title{News for Package \pkg{Rcpp}} 3\newcommand{\ghpr}{\href{https://github.com/RcppCore/Rcpp/pull/#1}{##1}} 4\newcommand{\ghit}{\href{https://github.com/RcppCore/Rcpp/issues/#1}{##1}} 5 6\section{Changes in Rcpp release version 1.0.7 (2021-07-06)}{ 7 \itemize{ 8 \item Changes in Rcpp API: 9 \itemize{ 10 \item Refactored \code{Rcpp_PreserveObject} and \code{Rcpp_ReleaseObject} 11 which are now O(1) (Dirk and Iñaki in \ghpr{1133} and \ghpr{1135} 12 fixing \ghit{382} and \ghit{1081}). 13 \item A spuriously assigned variable was removed (Dirk in 14 \ghpr{1138} fixing \ghit{1137}). 15 \item Global \code{Rcout} and \code{Rcerr} objects are supported 16 via a compiler directive (Iñaki in \ghpr{1139} fixing \ghit{928}) 17 \item Add support for \code{Rcpp::message} (Dirk in \ghpr{1146} 18 fixing \ghit{1145}). 19 \item The \code{uint32_t} type is used throughout instead of 20 \code{unsigned int} (Dirk in \ghpr{1153} fixing \ghit{1152}). 21 \item The \code{cfloat} header for floating point limits is now 22 included (Dirk in \ghpr{1162} fixing \ghit{1161}). 23 } 24 \item Changes in Rcpp Attributes: 25 \itemize{ 26 \item Packages with dots in their name can now have per-package 27 include files (Dirk in \ghpr{1132} fixing \ghit{1129}). 28 \item New argument \code{echo} to quieten optional evaluation in 29 \code{sourceCpp} (Dirk in \ghpr{1138} fixing \ghit{1126}). 30 } 31 \item Forthcoming Changes in Rcpp API: 32 \itemize{ 33 \item Starting with Rcpp 1.0.8 anticipated in January 2022, 34 \code{STRICT_R_HEADERS} will be enabled by default, see \ghit{1126}. 35 } 36 } 37} 38 39\section{Changes in Rcpp release version 1.0.6 (2021-01-14)}{ 40 \itemize{ 41 \item Changes in Rcpp API: 42 \itemize{ 43 \item Replace remaining few uses of \code{EXTPTR_PTR} with 44 \code{R_ExternalPtrAddr} (Kevin in \ghpr{1098} fixing 45 \ghit{1097}). 46 \item Add \code{push_back} and \code{push_front} for 47 \code{DataFrame} (Walter Somerville in \ghpr{1099} fixing 48 \ghit{1094}). 49 \item Remove a misleading-to-wrong comment (Mattias Ellert in 50 \ghpr{1109} cleaning up after \ghpr{1049}). 51 \item Address a sanitizer report by initializing two private 52 \code{bool} variables (Benjamin Christoffersen in \ghpr{1113}). 53 \item External pointer finalizer toggle default values were 54 corrected to true (Dirk in \ghpr{1115}). 55 } 56 \item Changes in Rcpp Documentation: 57 \itemize{ 58 \item Several URLs were updated to https and/or new addresses (Dirk). 59 } 60 \item Changes in Rcpp Deployment: 61 \itemize{ 62 \item Added GitHub Actions CI using the same container-based setup 63 used previously, and also carried code coverage over (Dirk in 64 \ghpr{1128}). 65 } 66 \item Changes in Rcpp support functions: 67 \itemize{ 68 \item \code{Rcpp.package.skeleton()} avoids warning from R. (Dirk) 69 } 70 } 71} 72 73\section{Changes in Rcpp release version 1.0.5 (2020-07-01)}{ 74 \itemize{ 75 \item Changes in Rcpp API: 76 \itemize{ 77 \item The exception handler code in \ghpr{1043} was updated to ensure 78 proper include behavior (Kevin in \ghpr{1047} fixing \ghit{1046}). 79 \item A missing \code{Rcpp_list6} definition was added to support 80 R 3.3.* builds (Davis Vaughan in \ghpr{1049} fixing \ghit{1048}). 81 \item Missing \code{Rcpp_list{2,3,4,5}} definition were added to 82 the Rcpp namespace (Dirk in \ghpr{1054} fixing \ghit{1053}). 83 \item A further updated corrected the header include and provided 84 a missing else branch (Mattias Ellert in \ghpr{1055}). 85 \item Two more assignments are protected with \code{Rcpp::Shield} 86 (Dirk in \ghpr{1059}). 87 \item One call to \code{abs} is now properly namespaced with 88 \code{std::} (Uwe Korn in \ghpr{1069}). 89 \item String object memory preservation was corrected/simplified 90 (Kevin in \ghpr{1082}). 91 } 92 \item Changes in Rcpp Attributes: 93 \itemize{ 94 \item Empty strings are not passed to \code{R CMD SHLIB} which was 95 seen with R 4.0.0 on Windows (Kevin in \ghpr{1062} fixing 96 \ghpr{1061}). 97 \item The \code{short_file_name()} helper function is safer with 98 respect to temporaries (Kevin in \ghpr{1067} fixing \ghit{1066}, 99 and \ghpr{1071} fixing \ghpr{1070}). 100 } 101 \item Changes in Rcpp Sugar: 102 \itemize{ 103 \item Two \code{sample()} objects are now standard vectors and not 104 \code{R_alloc} created (Dirk in \ghpr{1075} fixing \ghpr{1074}). 105 } 106 \item Changes in Rcpp support functions: 107 \itemize{ 108 \item \code{Rcpp.package.skeleton()} adjusts for a (documented) 109 change in R 4.0.0 (Dirk in \ghpr{1088} fixing \ghpr{1087}). 110 } 111 \item Changes in Rcpp Documentation: 112 \itemize{ 113 \item The pdf file of the earlier introduction is again typeset 114 with bibliographic information (Dirk). 115 \item A new vignette describing how to package C++ libraries has 116 been added (Dirk in \ghpr{1078} fixing \ghit{1077}). 117 } 118 \item Changes in Rcpp Deployment: 119 \itemize{ 120 \item Travis CI unit tests now run a matrix over the versions of R 121 also tested at CRAN (rel/dev/oldrel/oldoldrel), and coverage runs 122 in parallel for a net speed-up (Dirk in \ghpr{1056} and 123 \ghpr{1057}). 124 \item The exceptions test is now partially skipped on Solaris as 125 it already is on Windows (Dirk in \ghpr{1065}). 126 \item The default CI runner was upgraded to R 4.0.0 (Dirk). 127 \item The CI matrix spans R 3.5, 3.6, r-release and r-devel (Dirk). 128 } 129 } 130} 131 132\section{Changes in Rcpp version 1.0.4 (2020-03-13)}{ 133 \itemize{ 134 \item Changes in Rcpp API: 135 \itemize{ 136 \item Safer \code{Rcpp_list*}, \code{Rcpp_lang*} and 137 \code{Function.operator()} (Romain in \ghpr{1014}, \ghit{1015}). 138 \item A number of \code{#nocov} markers were added (Dirk in 139 \ghpr{1036}, \ghpr{1042} and \ghpr{1044}). 140 \item Finalizer calls clear external pointer first (Kirill Müller and 141 Dirk in \ghpr{1038}). 142 \item Scalar operations with a rhs matrix no longer change the 143 matrix value (Qiang in \ghpr{1040} fixing (again) \ghit{365}). 144 \item \code{Rcpp::exception} and \code{Rcpp::stop} are now more 145 thread-safe (Joshua Pritikin in \ghpr{1043}). 146 } 147 \item Changes in Rcpp Attributes: 148 \itemize{ 149 \item The \code{cppFunction} helper now deals correctly with mulitple 150 \code{depends} arguments (TJ McKinley in \ghpr{1016} fixing 151 \ghit{1017}). 152 \item Invisible return objects are now supported via new option (Kun Ren 153 in \ghpr{1025} fixing \ghit{1024}). 154 \item Unavailable packages referred to in \code{LinkingTo} are now 155 reported (Dirk in \ghpr{1027} fixing \ghit{1026}). 156 \item The \code{sourceCpp} function can now create a debug DLL on 157 Windows (Dirk in \ghpr{1037} fixing \ghit{1035}). 158 } 159 \item Changes in Rcpp Documentation: 160 \itemize{ 161 \item The \code{.github/} directory now has more explicit guidance on 162 contributing, issues, and pull requests (Dirk). 163 \item The Rcpp Attributes vignette describe the new invisible return 164 object option (Kun Ren in \ghpr{1025}). 165 \item Vignettes are now included as pre-made pdf files (Dirk in \ghpr{1029}) 166 \item The Rcpp FAQ has a new entry on the recommended 167 \code{importFrom} directive (Dirk in \ghpr{1031} fixing \ghit{1030}). 168 \item The bib file for the vignette was once again updated to 169 current package versions (Dirk). 170 } 171 \item Changes in Rcpp Deployment: 172 \itemize{ 173 \item Added unit test to check if C++ version remains remains aligned 174 with the package number (Dirk in \ghpr{1022} fixing \ghit{1021}). 175 \item The unit test system was switched to tinytest (Dirk in 176 \ghpr{1028}, \ghpr{1032}, \ghpr{1033}). 177 } 178 } 179} 180 181\section{Changes in Rcpp version 1.0.3 (2019-11-08)}{ 182 \itemize{ 183 \item Changes in Rcpp API: 184 \itemize{ 185 \item Compilation can be sped up by skipping Modules headers via a 186 toggle \code{RCPP_NO_MODULES} (Kevin in \ghpr{995} for \ghit{993}). 187 \item Compilation can be sped up by toggling \code{RCPP_NO_RTTI} which 188 implies \code{RCPP_NO_MODULES} (Dirk in \ghpr{998} fixing \ghit{997}). 189 \item \code{XPtr} tags are now preserved in \code{as<>} (Stephen Wade 190 in \ghpr{1003} fixing \ghit{986}, plus Dirk in \ghpr{1012}). 191 \item A few more temporary allocations are now protected from garbage 192 collection (Romain Francois in \ghpr{1010}, and Dirk in \ghpr{1011}). 193 } 194 \item Changes in Rcpp Modules: 195 \itemize{ 196 \item Improved initialization via explicit \code{Rcpp::} prefix 197 (Riccardo Porreca in \ghpr{980}). 198 } 199 \item Changes in Rcpp Deployment: 200 \itemize{ 201 \item A unit test for Rcpp Class exposure was updated to not fail under 202 r-devel (Dirk in \ghpr{1008} fixing \ghit{1006}). 203 } 204 \item Changes in Rcpp Documentation: 205 \itemize{ 206 \item The \code{Rcpp-modules} vignette received a major review and 207 edit (Riccardo Porreca in \ghpr{982}). 208 \item Minor whitespace alignments and edits were made in three 209 vignettes following the new \pkg{pinp} release (Dirk). 210 \item New badges for DOI and CRAN and BioConductor reverse dependencies 211 have been added to README.md (Dirk). 212 \item Vignettes are now included pre-made (Dirk in \ghpr{1005} 213 addressing \ghit{1004})). 214 \item The Rcpp FAQ has two new entries on 'no modules / no rtti' and 215 exceptions across shared libraries (Dirk in \ghpr{1009}). 216 } 217 } 218} 219 220\section{Changes in Rcpp version 1.0.2 (2019-07-20)}{ 221 \itemize{ 222 \item Changes in Rcpp API: 223 \itemize{ 224 \item Files in \code{src/} are now consistentely lowercase (Dirk 225 in \ghpr{956}). 226 \item The Rcpp 'API Version' is now accessible via 227 \code{getRcppVersion()} (Dirk in \ghpr{963}). 228 } 229 \item Changes in Rcpp Attributes: 230 \itemize{ 231 \item The second END wrapper macro also gets \code{UNPROTECT} and 232 a variable reference suppressing compiler warnings (Dirk in 233 \ghpr{953} fixing \ghit{951}). 234 \item Default function arguments are parsed correctly (Pierrick 235 Roger in \ghpr{977} fixing \ghit{975}) 236 } 237 \item Changes in Rcpp Sugar: 238 \itemize{ 239 \item Added decreasing parameter to \code{sort_unique()} 240 (James Balamuta in \ghpr{958} addressing \ghit{950}). 241 } 242 \item Changes in Rcpp Deployment: 243 \itemize{ 244 \item Travis CI unit tests are now always running irrespective of 245 the package version (Dirk in \ghpr{954}). 246 } 247 \item Changes in Rcpp Documentation: 248 \itemize{ 249 \item The \code{Rcpp-modules} vignette now covers the 250 \code{RCPP_EXPOSED_*} macros, and the \code{Rcpp-extending} vignette 251 references it (Ralf Stubner in \ghpr{959} fixing \ghit{952}). 252 } 253 } 254} 255 256\section{Changes in Rcpp version 1.0.1 (2019-03-17)}{ 257 \itemize{ 258 \item Changes in Rcpp API: 259 \itemize{ 260 \item Subsetting is no longer limited by an integer range (William 261 Nolan in \ghpr{920} fixing \ghit{919}). 262 \item Error messages from subsetting are now more informative 263 (Qiang and Dirk). 264 \item \code{Shelter} increases count only on non-null objects 265 (Dirk in \ghpr{940} as suggested by Stepan Sindelar in \ghit{935}). 266 \item \code{AttributeProxy::set()} and a few related setters get 267 \code{Shield<>} to ensure \code{rchk} is happy (Romain in \ghpr{947} 268 fixing \ghit{946}). 269 } 270 \item Changes in Rcpp Attributes: 271 \itemize{ 272 \item A new plugin was added for C++20 (Dirk in \ghpr{927}) 273 \item Fixed an issue where 'stale' symbols could become registered in 274 RcppExports.cpp, leading to linker errors and other related issues 275 (Kevin in \ghpr{939} fixing \ghit{733} and \ghit{934}). 276 \item The wrapper macro gets an \code{UNPROTECT} to ensure \code{rchk} 277 is happy (Romain in \ghpr{949}) fixing \ghit{948}). 278 } 279 \item Changes in Rcpp Documentation: 280 \itemize{ 281 \item Three small corrections were added in the 'Rcpp Quickref' 282 vignette (Zhuoer Dong in \ghpr{933} fixing \ghit{932}). 283 \item The \code{Rcpp-modules} vignette now has documentation for 284 \code{.factory} (Ralf Stubner in \ghpr{938} fixing \ghit{937}). 285 } 286 \item Changes in Rcpp Deployment: 287 \itemize{ 288 \item Travis CI again reports to CodeCov.io (Dirk and Ralf Stubner in 289 \ghpr{942} fixing \ghit{941}). 290 } 291 } 292} 293 294\section{Changes in Rcpp version 1.0.0 (2018-11-05)}{ 295 \itemize{ 296 \item Happy tenth birthday to Rcpp, and hello release 1.0 ! 297 \item Changes in Rcpp API: 298 \itemize{ 299 \item The empty destructor for the \code{Date} class was removed 300 to please g++-9 (prerelease) and \code{-Wdeprecated-copy} (Dirk). 301 \item The constructor for \code{NumericMatrix(not_init(n,k))} was 302 corrected (Romain in \ghpr{904}, Dirk in \ghpr{905}, and also 303 Romain in \ghpr{908} fixing \ghpr{907}). 304 \item \code{Rcpp::String} no longer silently drops embedded 305 \code{NUL} bytes in strings but throws new Rcpp exception 306 \code{embedded_nul_in_string}. (Kevin in \ghpr{917} fixing \ghit{916}). 307 } 308 \item Changes in Rcpp Deployment: 309 \itemize{ 310 \item The Dockerfile for Continuous Integration sets the required 311 test flag (for release versions) inside the container (Dirk). 312 \item Correct the \code{R CMD check} call to skip vignettes (Dirk). 313 } 314 \item Changes in Rcpp Attributes: 315 \itemize{ 316 \item A new \code{[[Rcpp::init]]} attribute allows function 317 registration for running on package initialization (JJ in 318 \ghpr{903}). 319 \item Sort the files scanned for attributes in the C locale for 320 stable output across systems (JJ in \ghpr{912}). 321 } 322 \item Changes in Rcpp Documentation: 323 \itemize{ 324 \item The 'Rcpp Extending' vignette was corrected and refers to 325 \code{EXPOSED} rather than \code{EXPORTED} (Ralf Stubner in 326 \ghpr{910}). 327 \item The 'Unit test' vignette is no longer included (Dirk in 328 \ghpr{914}). 329 } 330 } 331} 332 333\section{Changes in Rcpp version 0.12.19 (2018-09-20)}{ 334 \itemize{ 335 \item Changes in Rcpp API: 336 \itemize{ 337 \item The \code{no_init()} accessor for vectors and matrices is 338 now wrapped in \code{Shield<>()} to not trigger \code{rchk} 339 warnings (Kirill Müller in \ghpr{893} addressing \ghit{892}). 340 \item \code{STRICT_R_HEADERS} will be defined twelve months from 341 now; until then we protect it via \code{RCPP_NO_STRICT_HEADERS} 342 which can then be used to avoid the definition; downstream 343 maintainers are encouraged to update their packages as needed 344 (Dirk in \ghpr{900} beginning to address \ghit{898}). 345 } 346 \item Changes in Rcpp Attributes: 347 \itemize{ 348 \item Added \code{[[Rcpp::init]]} attribute for registering C++ 349 functions to run during package initialization (JJ in \ghpr{903} 350 addressing \ghit{902}). 351 } 352 \item Changes in Rcpp Modules: 353 \itemize{ 354 \item Improved \code{exposeClass} functionality along with added 355 test (Martin Lysy in \ghpr{886} fixing \ghit{879}). 356 } 357 \item Changes in Rcpp Documentation: 358 \itemize{ 359 \item Two typos were fixed in the Rcpp Sugar vignette (Patrick 360 Miller in \ghpr{895}). 361 \item Several vignettes now use the \code{collapse} argument to 362 show output in the corresponding code block. 363 } 364 \item Changes in Rcpp Deployment: 365 \itemize{ 366 \item The old \code{LdFlags()} build helper was marked as 367 deprecated [but removed for release] (Dirk in \ghpr{887}). 368 \item Dockerfiles for continuous integration, standard deployment 369 and 'plus sized' deployment are provided along with builds 370 (Dirk in \ghpr{894}). 371 \item Travis CI now use the \code{rcpp/ci} container for tests 372 (Dirk in \ghpr{896}). 373 } 374 } 375} 376 377\section{Changes in Rcpp version 0.12.18 (2018-07-21)}{ 378 \itemize{ 379 \item Changes in Rcpp API: 380 \itemize{ 381 \item The \code{StringProxy::operator==} is now \code{const} 382 correct (Romain in \ghpr{855} fixing \ghit{854}). 383 \item The \code{Environment::new_child()} is now \code{const} 384 (Romain in \ghpr{858} fixing \ghit{854}). 385 \item Next \code{eval} codes now properly unwind (Lionel in the large 386 and careful \ghpr{859} fixing \ghit{807}). 387 \item In debugging mode, more type information is shown on 388 \code{abort()} (Jack Wasey in \ghpr{860} and \ghpr{882} fixing 389 \ghit{857}). 390 \item A new class was added which allow suspension of the RNG 391 synchronisation to address an issue seen in \CRANpkg{RcppDE} 392 (Kevin in \ghpr{862}). 393 \item Evaluation calls now happen in the \code{base} environment 394 (which may fix an issue seen between \CRANpkg{conflicted} and some 395 BioConductor packages) (Kevin in \ghpr{863} fixing \ghit{861}). 396 \item Call stack display on error can now be controlled more 397 finely (Romain in \ghpr{868}). 398 \item The new \code{Rcpp_fast_eval} is used instead of 399 \code{Rcpp_eval} though this still requires setting 400 \code{RCPP_USE_UNWIND_PROTECT} before including \code{Rcpp.h} (Qiang 401 Kou in \ghpr{867} closing \ghit{866}). 402 \item The \code{Rcpp::unwindProtect()} function extracts the 403 unwinding from the \code{Rcpp_fast_eval()} function and makes it 404 more generally available. (Lionel in \ghpr{873} and \ghpr{877}). 405 \item The \code{tm_gmtoff} part is skipped on AIX too 406 (\ghpr{876}). 407 } 408 \item Changes in Rcpp Attributes: 409 \itemize{ 410 \item The \code{sourceCpp()} function now evaluates R code in the 411 correct local environment in which a function was compiled (Filip 412 Schouwenaars in \ghpr{852} and \ghpr{869} fixing \ghit{851}). 413 \item Filenames are now sorted in a case-insenstive way so that 414 the \code{RcppExports} files are more stable across locales (Jack 415 Wasey in \ghpr{878}). 416 } 417 \item Changes in Rcpp Sugar: 418 \itemize{ 419 \item The sugar functions \code{min} and \code{max} now recognise 420 empty vectors (Dirk in \ghpr{884} fixing \ghit{883}). 421 } 422 } 423} 424 425 426\section{Changes in Rcpp version 0.12.17 (2018-05-09)}{ 427 \itemize{ 428 \item Changes in Rcpp API: 429 \itemize{ 430 \item The random number \code{Generator} class no longer inherits from 431 \code{RNGScope} (Kevin in \ghpr{837} fixing \ghit{836}). 432 \item A new class, \code{SuspendRNGSynchronizationScope}, can be created 433 and used to ensure that calls to Rcpp functions do not attempt to call 434 \code{::GetRNGstate()} or \code{::PutRNGstate()} for the duration of 435 some code block. 436 \item A spurious parenthesis was removed to please gcc8 (Dirk 437 fixing \ghit{841}) 438 \item The optional \code{Timer} class header now undefines 439 \code{FALSE} which was seen to have side-effects on some platforms 440 (Romain in \ghpr{847} fixing \ghpr{846}). 441 \item Optional \code{StoragePolicy} attributes now also work for 442 string vectors (Romain in \ghpr{850} fixing \ghit{849}). 443 } 444 \item Changes in Rcpp Documentation: 445 \itemize{ 446 \item A few old typesetting conventions from the prior Rnw format 447 have been corrected (Peter Hickey in \ghpr{831}; Joris Meys; Dirk) 448 \item Two internal links to the introduction published in JSS have been 449 updated to the changed filename given the newer TAS introduction. 450 \item Some remaining backticks were replaced with straight quotes 451 (Ralf Stubner in \ghpr{845}). 452 \item A citation to the Rcpp introducion in the The American 453 Statistician has been added to the introductory and FAQ vignettes. 454 } 455 } 456} 457 458\section{Changes in Rcpp version 0.12.16 (2018-03-08)}{ 459 \itemize{ 460 \item Changes in Rcpp API: 461 \itemize{ 462 \item Rcpp now sets and puts the RNG state upon each entry to an Rcpp 463 function, ensuring that nested invocations of Rcpp functions manage the 464 RNG state as expected (Kevin in \ghpr{825} addressing \ghit{823}). 465 \item The \code{R::pythag} wrapper has been commented out; the underlying 466 function has been gone from R since 2.14.0, and \code{::hypot()} (part of 467 C99) is now used unconditionally for complex numbers (Dirk in \ghpr{826}). 468 \item The \code{long long} type can now be used on 64-bit Windows (Kevin 469 in \ghpr{811} and again in \ghpr{829} addressing \ghit{804}). 470 } 471 \item Changes in Rcpp Attributes: 472 \itemize{ 473 \item Code generated with \code{cppFunction()} now uses \code{.Call()} 474 directly (Kirill Müller in \ghpr{813} addressing \ghit{795}). 475 } 476 \item Changes in Rcpp Documentation: 477 \itemize{ 478 \item The Rcpp FAQ vignette is now indexed as `Rcpp-FAQ`; a stale Gmane 479 reference was removed and entry for getting compilers under Conda was added. 480 \item The top-level README.md now has a \emph{Support} section. 481 \item The Rcpp.bib reference file was refreshed to current versions. 482 } 483 } 484} 485 486\section{Changes in Rcpp version 0.12.15 (2018-01-16)}{ 487 \itemize{ 488 \item Changes in Rcpp API: 489 \itemize{ 490 \item Calls from exception handling to \code{Rf_warning()} now correctly 491 set an initial format string (Dirk in \ghpr{777} fixing \ghit{776}). 492 \item The 'new' Date and Datetime vectors now have \code{is_na} methods 493 too. (Dirk in \ghpr{783} fixing \ghit{781}). 494 \item Protect more temporary \code{SEXP} objects produced by \code{wrap} 495 (Kevin in \ghpr{784}). 496 \item Use public R APIs for \code{new_env} (Kevin in \ghpr{785}). 497 \item Evaluation of R code is now safer when compiled against R 498 3.5 (you also need to explicitly define \code{RCPP_USE_UNWIND_PROTECT} 499 before including \code{Rcpp.h}). Longjumps of all kinds (condition 500 catching, returns, restarts, debugger exit) are appropriately 501 detected and handled, e.g. the C++ stack unwinds correctly 502 (Lionel in \ghpr{789}). [ Committed but subsequently disabled in release 503 0.12.15 ] 504 \item The new function \code{Rcpp_fast_eval()} can be used for 505 performance-sensitive evaluation of R code. Unlike 506 \code{Rcpp_eval()}, it does not try to catch errors with 507 \code{tryEval} in order to avoid the catching overhead. While this 508 is safe thanks to the stack unwinding protection, this also means 509 that R errors are not transformed to an \code{Rcpp::exception}. If 510 you are relying on error rethrowing, you have to use the slower 511 \code{Rcpp_eval()}. On old R versions \code{Rcpp_fast_eval()} 512 falls back to \code{Rcpp_eval()} so it is safe to use against any 513 versions of R (Lionel in \ghpr{789}). [ Committed but subsequently 514 disabled in release 0.12.15 ] 515 \item Overly-clever checks for \code{NA} have been removed (Kevin in 516 \ghpr{790}). 517 \item The included tinyformat has been updated to the current version, 518 Rcpp-specific changes are now more isolated (Kirill in \ghpr{791}). 519 \item Overly picky \emph{fall-through} warnings by gcc-7 regarding 520 \code{switch} statements are now pre-empted (Kirill in \ghpr{792}). 521 \item Permit compilation on ANDROID (Kenny Bell in \ghpr{796}). 522 \item Improve support for NVCC, the CUDA compiler (Iñaki Ucar in 523 \ghpr{798} addressing \ghit{797}). 524 \item Speed up tests for NA and NaN (Kirill and Dirk in \ghpr{799} and 525 \ghpr{800}). 526 \item Rearrange stack unwind test code, keep test disabled for now (Lionel 527 in \ghpr{801}). 528 \item Further condition away protect unwind behind #define (Dirk in 529 \ghpr{802}). 530 } 531 \item Changes in Rcpp Attributes: 532 \itemize{ 533 \item Addressed a missing Rcpp namespace prefix when generating a C++ 534 interface (James Balamuta in \ghpr{779}). 535 } 536 \item Changes in Rcpp Documentation: 537 \itemize{ 538 \item The Rcpp FAQ now shows \code{Rcpp::Rcpp.plugin.maker()} and not the 539 outdated \code{:::} use applicable non-exported functions. 540 } 541 } 542} 543 544\section{Changes in Rcpp version 0.12.14 (2017-11-17)}{ 545 \itemize{ 546 \item Changes in Rcpp API: 547 \itemize{ 548 \item New const iterators functions \code{cbegin()} and \code{cend()} 549 added to \code{MatrixRow} as well (Dan Dillon in \ghpr{750}). 550 \item The \code{Rostream} object now contains a \code{Buffer} rather than 551 allocating one (Kirill Müller in \ghpr{763}). 552 \item New \code{DateVector} and \code{DatetimeVector} classes are now the 553 default fully deprecating the old classes as announced one year ago. 554 } 555 \item Changes in Rcpp Package: 556 \itemize{ 557 \item DESCRIPTION file now list doi information per CRAN suggestion. 558 } 559 \item Changes in Rcpp Documentation: 560 \itemize{ 561 \item Update CITATION file with doi information and PeerJ preprint. 562 } 563 } 564} 565 566\section{Changes in Rcpp version 0.12.13 (2017-09-24)}{ 567 \itemize{ 568 \item Changes in Rcpp API: 569 \itemize{ 570 \item New const iterators functions \code{cbegin()} and \code{cend()} have 571 been added to several vector and matrix classes (Dan Dillon and James 572 Balamuta in \ghpr{748}) starting to address \ghit{741}). 573 } 574 \item Changes in Rcpp Modules: 575 \itemize{ 576 \item Misplacement of one parenthesis in macro \code{LOAD_RCPP_MODULE} 577 was corrected (Lei Yu in \ghpr{737}) 578 } 579 \item Changes in Rcpp Documentation: 580 \itemize{ 581 \item Rewrote the macOS sections to depend on official documentation due 582 to large changes in the macOS toolchain. (James Balamuta in \ghpr{742} 583 addressing issue \ghit{682}). 584 \item Added a new vignette \sQuote{Rcpp-introduction} based on new PeerJ 585 preprint, renamed existing introduction to \sQuote{Rcpp-jss-2011}. 586 \item Transitioned all vignettes to the 'pinp' RMarkdown template 587 (James Balamuta and Dirk Eddelbuettel in \ghpr{755} addressing 588 issue \ghit{604}). 589 \item Added an entry on running `compileAttributes()` twice to the 590 Rcpp-FAQ (\ghit{#745}). 591 } 592 } 593} 594 595\section{Changes in Rcpp version 0.12.12 (2017-07-13)}{ 596 \itemize{ 597 \item Changes in Rcpp API: 598 \itemize{ 599 \item The \code{tinyformat.h} header now ends in a newline (\ghit{701}). 600 \item Fixed rare protection error that occurred when fetching stack traces 601 during the construction of an Rcpp exception (Kirill Müller in \ghpr{706}). 602 \item Compilation is now also possibly on Haiku-OS (Yo Gong in \ghpr{708} 603 addressing \ghit{707}). 604 \item Dimension attributes are explicitly cast to \code{int} (Kirill 605 Müller in \ghpr{715}). 606 \item Unused arguments are no longer declared (Kirill Müller in 607 \ghpr{716}). 608 \item Visibility of exported functions is now supported via the R macro 609 \code{atttribute_visible} (Jeroen Ooms in \ghpr{720}). 610 \item The \code{no_init()} constructor accepts \code{R_xlen_t} (Kirill 611 Müller in \ghpr{730}). 612 \item Loop unrolling used \code{R_xlen_t} (Kirill Müller in \ghpr{731}). 613 \item Two unused-variables warnings are now avoided (Jeff Pollock in 614 \ghpr{732}). 615 } 616 \item Changes in Rcpp Attributes: 617 \itemize{ 618 \item Execute tools::package_native_routine_registration_skeleton 619 within package rather than current working directory (JJ in \ghpr{697}). 620 \item The R portion no longer uses \code{dir.exists} to no require R 3.2.0 621 or newer (Elias Pipping in \ghpr{698}). 622 \item Fix native registration for exports with name attribute (JJ in \ghpr{703} 623 addressing \ghit{702}). 624 \item Automatically register init functions for Rcpp Modules (JJ in \ghpr{705} 625 addressing \ghit{704}). 626 \item Add Shield around parameters in Rcpp::interfaces (JJ in \ghpr{713} 627 addressing \ghit{712}). 628 \item Replace dot (".") with underscore ("_") in package names when generating 629 native routine registrations (JJ in \ghpr{722} addressing \ghit{721}). 630 \item Generate C++ native routines with underscore ("_") prefix to avoid 631 exporting when standard exportPattern is used in NAMESPACE (JJ in 632 \ghpr{725} addressing \ghit{723}). 633 } 634 } 635} 636 637\section{Changes in Rcpp version 0.12.11 (2017-05-20)}{ 638 \itemize{ 639 \item Changes in Rcpp API: 640 \itemize{ 641 \item Rcpp::exceptions can now be constructed without a call stack (Jim 642 Hester in \ghpr{663} addressing \ghit{664}). 643 \item Somewhat spurious compiler messages under very verbose settings are 644 now suppressed (Kirill Müller in \ghpr{670}, \ghpr{671}, \ghpr{672}, 645 \ghpr{687}, \ghpr{688}, \ghpr{691}). 646 \item Refreshed the included \code{tinyformat} template library 647 (James Balamuta in \ghpr{674} addressing \ghit{673}). 648 \item Added \code{printf}-like syntax support for exception classes and 649 variadic templating for \code{Rcpp::stop} and \code{Rcpp::warning} 650 (James Balamuta in \ghpr{676}). 651 \item Exception messages have been rewritten to provide additional 652 information. (James Balamuta in \ghpr{676} and \ghpr{677} addressing 653 \ghit{184}). 654 \item One more instance of \code{Rf_mkString} is protected from garbage 655 collection (Dirk in \ghpr{686} addressing \ghit{685}). 656 \item Two exception specification that are no longer tolerated by 657 \code{g++-7.1} or later were removed (Dirk in \ghpr{690} addressing 658 \ghit{689}) 659 } 660 \item Changes in Rcpp Documentation: 661 \itemize{ 662 \item Added a Known Issues section to the Rcpp FAQ vignette 663 (James Balamuta in \ghpr{661} addressing \ghit{628}, \ghit{563}, 664 \ghit{552}, \ghit{460}, \ghit{419}, and \ghit{251}). 665 } 666 \item Changes in Rcpp Sugar: 667 \itemize{ 668 \item Added sugar function \code{trimws} (Nathan Russell in \ghpr{680} 669 addressing \ghit{679}). 670 } 671 \item Changes in Rcpp Attributes: 672 \itemize{ 673 \item Automatically generate native routine registrations (JJ in \ghpr{694}) 674 \item The plugins for C++11, C++14, C++17 now set the values R 3.4.0 or 675 later expects; a plugin for C++98 was added (Dirk in \ghpr{684} addressing 676 \ghit{683}). 677 } 678 \item Changes in Rcpp support functions: 679 \itemize{ 680 \item The \code{Rcpp.package.skeleton()} function now creates a package 681 registration file provided R 3.4.0 or later is used (Dirk in \ghpr{692}) 682 } 683 } 684} 685 686\section{Changes in Rcpp version 0.12.10 (2017-03-17)}{ 687 \itemize{ 688 \item Changes in Rcpp API: 689 \itemize{ 690 \item Added new size attribute aliases for number of rows and columns in 691 DataFrame (James Balamuta in \ghpr{638} addressing \ghit{630}). 692 \item Fixed single-character handling in \code{Rstreambuf} (Iñaki Ucar in 693 \ghpr{649} addressing \ghit{647}). 694 \item XPtr gains a parameter \code{finalizeOnExit} to enable running the 695 finalizer when R quits (Jeroen Ooms in \ghpr{656} addressing \ghit{655}). 696 } 697 \item Changes in Rcpp Sugar: 698 \itemize{ 699 \item Fixed sugar functions \code{upper_tri()} and \code{lower_tri()} 700 (Nathan Russell in \ghpr{642} addressing \ghit{641}). 701 \item The \code{algorithm.h} file now accomodates the Intel compiler 702 (Dirk in \ghpr{643} and Dan in \ghpr{645} addressing issue \ghit{640}). 703 } 704 \item Changes in Rcpp Attributes: 705 \itemize{ 706 \item The C++17 standard is supported with a new plugin (used eg for 707 \code{g++-6.2}). 708 } 709 \item Changes in Rcpp Documentation: 710 \itemize{ 711 \item An overdue explanation of how C++11, C++14, and C++17 can be used 712 was added to the Rcpp FAQ. 713 } 714 } 715} 716 717\section{Changes in Rcpp version 0.12.9 (2017-01-14)}{ 718 \itemize{ 719 \item Changes in Rcpp API: 720 \itemize{ 721 \item The exception stack message is now correctly demangled on all 722 compiler versions (Jim Hester in \ghpr{598}) 723 \item Date and Datetime object and vector now have format methods and 724 \code{operator<<} support (\ghpr{599}). 725 \item The \code{size} operator in \code{Matrix} is explicitly referenced 726 avoiding a g++-6 issues (\ghpr{607} fixing \ghit{605}). 727 \item The underlying date calculation code was updated (\ghpr{621}, 728 \ghpr{623}). 729 \item Addressed improper diagonal fill for non-symmetric matrices 730 (James Balamuta in \ghpr{622} addressing \ghit{619}) 731 } 732 \item Changes in Rcpp Sugar: 733 \itemize{ 734 \item Added new Sugar function \code{sample()} (Nathan Russell in 735 \ghpr{610} and \ghpr{616}). 736 \item Added new Sugar function \code{Arg()} (James Balamuta in 737 \ghpr{626} addressing \ghit{625}). 738 } 739 \item Changes in Rcpp unit tests 740 \itemize{ 741 \item Added Environment::find unit tests and an Environment::get(Symbol) 742 test (James Balamuta in \ghpr{595} addressing issue \ghit{594}). 743 \item Added diagonal matrix fill tests 744 (James Balamuta in \ghpr{622} addressing \ghit{619}) 745 } 746 \item Changes in Rcpp Documentation: 747 \itemize{ 748 \item Exposed pointers macros were included in the Rcpp Extending vignette 749 (MathurinD; James Balamuta in \ghpr{592} addressing \ghit{418}). 750 \item The file \code{Rcpp.bib} move to directory \code{bib} which is 751 guaranteed to be present (\ghpr{631}). 752 } 753 \item Changes in Rcpp build system 754 \itemize{ 755 \item Travis CI now also calls \CRANpkg{covr} for coverage analysis (Jim 756 Hester in PR \ghpr{591}) 757 } 758 } 759} 760 761\section{Changes in Rcpp version 0.12.8 (2016-11-16)}{ 762 \itemize{ 763 \item Changes in Rcpp API: 764 \itemize{ 765 \item String and vector elements now use extended \code{R_xlen_t} indices 766 (Qiang in PR \ghpr{560}) 767 \item Hashing functions now return unsigned int (Qiang in PR \ghpr{561}) 768 \item Added static methods \code{eye()}, \code{ones()}, and \code{zeros()} 769 for select matrix types (Nathan Russell in PR \ghpr{569}) 770 \item The exception call stack is again correctly reported; print methods 771 and tests added too (Jim Hester in PR \ghpr{582} fixing \ghit{579}) 772 \item Variatic macros no longer use a GNU extensions (Nathan in PR 773 \ghpr{575}) 774 \item Hash index functions were standardized on returning unsigned 775 integers (Also PR \ghpr{575}) 776 } 777 \item Changes in Rcpp Sugar: 778 \itemize{ 779 \item Added new Sugar functions \code{rowSums()}, \code{colSums()}, 780 \code{rowMeans()}, \code{colMeans()} (PR \ghpr{551} by Nathan Russell 781 fixing \ghit{549}) 782 \item \code{Range} Sugar now used \code{R_xlen_t} type for start/end 783 (PR \ghpr{568} by Qiang Kou) 784 \item Defining \code{RCPP_NO_SUGAR} no longer breaks the build. 785 (PR \ghpr{585} by Daniel C. Dillon) 786 } 787 \item Changes in Rcpp unit tests 788 \itemize{ 789 \item A test for expression vectors was corrected. 790 \item The constructor test for datetime vectors reflects the new classes 791 which treats Inf correctly (and still as a non-finite value) 792 } 793 \item Changes in Rcpp Attributes 794 \itemize{ 795 \item An 'empty' return was corrected (PR \ghpr{589} fixing issue 796 \ghit{588}, and with thanks to Duncan Murdoch for the heads-up) 797 } 798 \item Updated Date and Datetime vector classes: 799 \itemize{ 800 \item The \code{DateVector} and \code{DatetimeVector} classes were renamed 801 with a prefix \code{old}; they are currently \code{typedef}'ed to the 802 existing name (\ghpr{557}) 803 \item New variants \code{newDateVector} and \code{newDatetimeVector} were 804 added based on \code{NumericVector} (also \ghpr{557}, \ghpr{577}, 805 \ghpr{581}, \ghpr{587}) 806 \item By defining \code{RCPP_NEW_DATE_DATETIME_VECTORS} the new classes 807 can activated. We intend to make the new classes the default no sooner 808 than twelve months from this release. 809 \item The \code{capabilities()} function can also be used for presence of 810 this feature 811 } 812 } 813} 814 815\section{Changes in Rcpp version 0.12.7 (2016-09-04)}{ 816 \itemize{ 817 \item Changes in Rcpp API: 818 \itemize{ 819 \item The \code{NORET} macro is now defined if it was not already defined 820 by R itself (Kevin fixing issue \ghit{512}). 821 \item Environment functions get() & find() now accept a Symbol 822 (James Balamuta in \ghpr{513} addressing issue \ghit{326}). 823 \item Several uses of \code{Rf_eval} were replaced by the preferred 824 \code{Rcpp::Rcpp_eval} (Qiang in PR \ghpr{523} closing \ghit{498}). 825 \item Improved Autogeneration Warning for RcppExports 826 (James Balamuta in \ghpr{528} addressing issue \ghit{526}). 827 \item Fixed invalid C++ prefix identifiers in auto-generated code 828 (James Balamuta in \ghpr{528} and \ghpr{531} addressing issue 829 \ghit{387}; Simon Dirmeier in \ghpr{548}). 830 \item String constructors now set default UTF-8 encoding (Qiang Kou in 831 \ghpr{529} fixing \ghit{263}). 832 \item Add variadic variants of the \code{RCPP_RETURN_VECTOR} and 833 \code{RCPP_RETURN_MATRIX} macro when C++11 compiler used (Artem Klevtsov 834 in \ghpr{537} fixing \ghit{38}). 835 } 836 \item Changes in Rcpp build system 837 \itemize{ 838 \item Travis CI is now driven via \code{run.sh} from our fork, and deploys 839 all packages as .deb binaries using our PPA where needed (Dirk in 840 \ghpr{540} addressing issue \ghit{517}). 841 } 842 \item Changes in Rcpp unit tests 843 \itemize{ 844 \item New unit tests for random number generators the R namespace which 845 call the standalone Rmath library. (James Balamuta in \ghpr{514} 846 addressing issue \ghit{28}). 847 } 848 \item Changes in Rcpp Examples: 849 \itemize{ 850 \item Examples that used cxxfunction() from the inline package have been 851 rewritten to use either sourceCpp() or cppFunction() 852 (James Balamuta in \ghpr{541}, \ghpr{535}, \ghpr{534}, and \ghpr{532} 853 addressing issue \ghit{56}). 854 } 855 } 856} 857 858\section{Changes in Rcpp version 0.12.6 (2016-07-18)}{ 859 \itemize{ 860 \item Changes in Rcpp API: 861 \itemize{ 862 \item The \code{long long} data type is used only if it is available, 863 to avoid compiler warnings (Kirill Müller in \ghpr{488}). 864 \item The compiler is made aware that \code{stop()} never returns, to 865 improve code path analysis (Kirill Müller in \ghpr{487} addressing issue 866 \ghit{486}). 867 \item String replacement was corrected (Qiang in \ghpr{479} following 868 mailing list bug report by Masaki Tsuda) 869 \item Allow for UTF-8 encoding in error messages via 870 \code{RCPP_USING_UTF8_ERROR_STRING} macro (Qin Wenfeng in \ghpr{493}) 871 \item The R function \code{Rf_warningcall} is now provided as well (as 872 usual without leading \code{Rf_}) (\ghpr{497} fixing \ghit{495}) 873 } 874 \item Changes in Rcpp Sugar: 875 \itemize{ 876 \item Const-ness of \code{min} and \code{max} functions has been corrected. 877 (Dan Dillon in PR \ghpr{478} fixing issue \ghit{477}). 878 \item Ambiguities for matrix/vector and scalar operations have been fixed 879 (Dan Dillon in PR \ghpr{476} fixing issue \ghit{475}). 880 \item New \code{algorithm} header using iterator-based approach for 881 vectorized functions (Dan in PR \ghpr{481} revisiting PR \ghpr{428} and 882 addressing issue \ghit{426}, with futher work by Kirill in PR \ghpr{488} 883 and Nathan in \ghpr{503} fixing issue \ghit{502}). 884 \item The \code{na_omit()} function is now faster for vectors without 885 \code{NA} values (Artem Klevtsov in PR \ghpr{492}) 886 } 887 \item Changes in Rcpp Attributes: 888 \itemize{ 889 \item Add \code{cacheDir} argument to \code{sourceCpp()} to enable caching of 890 shared libraries across R sessions (JJ in \ghpr{504}). 891 \item Code generation now deals correctly which packages containing a dot 892 in their name (Qiang in \ghpr{501} fixing \ghit{500}). 893 } 894 \item Changes in Rcpp Documentation: 895 \itemize{ 896 \item A section on default parameters was added to the Rcpp FAQ vignette 897 (James Balamuta in \ghpr{505} fixing \ghit{418}). 898 \item The Rcpp-attributes vignette is now mentioned more prominently in 899 question one of the Rcpp FAQ vignette. 900 \item The Rcpp Quick Reference vignette received a facelift with new 901 sections on Rcpp attributes and plugins begin added. (James Balamuta in 902 \ghpr{509} fixing \ghit{484}). 903 \item The bib file was updated with respect to the recent JSS publication 904 for RProtoBuf. 905 } 906 } 907} 908 909\section{Changes in Rcpp version 0.12.5 (2016-05-14)}{ 910 \itemize{ 911 \item Changes in Rcpp API: 912 \itemize{ 913 \item The checks for different C library implementations now also check for Musl 914 used by Alpine Linux (Sergio Marques in PR \ghpr{449}). 915 \item \code{Rcpp::Nullable} works better with Rcpp::String (Dan Dillon in 916 PR \ghpr{453}). 917 } 918 \item Changes in Rcpp Attributes: 919 \itemize{ 920 \item R 3.3.0 Windows with Rtools 3.3 is now supported (Qin Wenfeng in PR 921 \ghpr{451}). 922 \item Correct handling of dependent file paths on Windows (use winslash = "/"). 923 } 924 \item Changes in Rcpp Modules: 925 \itemize{ 926 \item An apparent race condition in Module loading seen with R 3.3.0 was 927 fixed (Ben Goodrich in \ghpr{461} fixing \ghit{458}). 928 \item The (older) \code{loadRcppModules()} is now deprecated in favour of 929 \code{loadModule()} introduced around R 2.15.1 and Rcpp 0.9.11 (PR \ghpr{470}). 930 } 931 \item Changes in Rcpp support functions: 932 \itemize{ 933 \item The \code{Rcpp.package.skeleton()} function was again updated in 934 order to create a \code{DESCRIPTION} file which passes \code{R CMD check} 935 without notes. warnings, or error under R-release and R-devel (PR \ghpr{471}). 936 \item A new function \code{compilerCheck} can test for minimal \code{g++} 937 versions (PR \ghpr{474}). 938 } 939 } 940} 941 942\section{Changes in Rcpp version 0.12.4 (2016-03-22)}{ 943 \itemize{ 944 \item Changes in Rcpp API: 945 \itemize{ 946 \item New accessors \code{as()} and \code{clone()} were added to the 947 \code{Nullable} class (Dan in PR \ghpr{423} closing \ghit{421}) 948 \item The \code{Nullable<>::operator SEXP()} and 949 \code{Nullable<>::get()} now also work for \code{const} objects 950 (Kirill Müller in PR \ghpr{417}). 951 \item A subsetting error was fixed (Qiang via \ghpr{432} closing 952 \ghit{431}). 953 } 954 \item Changes in Rcpp Sugar: 955 \itemize{ 956 \item Added new Sugar function \code{median()} (Nathan in PR \ghpr{425} 957 closing \ghit{424}) 958 \item Added new Sugar function \code{cbind()} (Nathan in PR \ghpr{447} 959 closing \ghit{407}) 960 } 961 \item Changes in Rcpp Attributes: 962 \itemize{ 963 \item A plugin for C++14 was added (Dan in PR \ghpr{427}) 964 } 965 \item Changes in Rcpp Documentation: 966 \itemize{ 967 \item An entry was added to the Rcpp-FAQ vignette describing the required 968 packages for vignette building (\ghit{422}). 969 \item Use on OS X was further detailed (James Balamuta in \ghpr{433} with 970 further review by Bob Rudis). 971 \item An entry was added concerning the hard-code limit of arguments to 972 some constructor and function (cf \ghit{435}). 973 \item The Rcpp-FAQ vignette now contains a table of content. 974 \item Typos and indentation were corrected in the Rcpp Sugar vignette 975 (\ghpr{445} by Colin Gillespie). 976 } 977 } 978} 979 980\section{Changes in Rcpp version 0.12.3 (2016-01-10)}{ 981 \itemize{ 982 \item Changes in Rcpp API: 983 \itemize{ 984 \item Const iterators now \code{CharacterVector} now behave like regular 985 iterators (PR \ghpr{404} by Dan fixing \ghit{362}). 986 \item Math operators between matrix and scalars type have been added (PR 987 \ghpr{406} by Qiang fixing \ghit{365}). 988 \item A missing \code{std::hash} function interface for 989 \code{Rcpp::String} has been addded (PR \ghpr{408} by Qiang fixing 990 \ghit{84}). 991 } 992 \item Changes in Rcpp Attributes: 993 \itemize{ 994 \item Avoid invalid function names when generating C++ interfaces (PR 995 \ghpr{403} by JJ fixing \ghit{402}). 996 \item Insert additional space around \code{&} in function interface (PR 997 \ghpr{400} by Kazuki Fukui fixing \ghit{278}). 998 } 999 \item Changes in Rcpp Modules: 1000 \itemize{ 1001 \item The copy constructor now initialized the base class (PR \ghpr{411} 1002 by Joshua Pritikin fixing \ghit{410}) 1003 } 1004 \item Changes in Rcpp Repository: 1005 \itemize{ 1006 \item Added a file \code{Contributing.md} providing some points to 1007 potential contributors (PR \ghpr{414} closing issue \ghit{413}) 1008 } 1009 } 1010} 1011 1012\section{Changes in Rcpp version 0.12.2 (2015-11-14)}{ 1013 \itemize{ 1014 \item Changes in Rcpp API: 1015 \itemize{ 1016 \item Correct return type in product of matrix dimensions (PR \ghpr{374} 1017 by Florian) 1018 \item Before creating a single String object from a \code{SEXP}, ensure 1019 that it is from a vector of length one (PR \ghpr{376} by Dirk, fixing 1020 \ghit{375}). 1021 \item No longer use \code{STRING_ELT} as a left-hand side, thanks to a 1022 heads-up by Luke Tierney (PR \ghpr{378} by Dirk, fixing \ghit{377}). 1023 \item Rcpp Module objects are now checked more carefully (PR \ghpr{381} 1024 by Tianqi, fixing \ghit{380}) 1025 \item An overflow in Matrix column indexing was corrected (PR \ghpr{390} 1026 by Qiang, fixing a bug reported by Allessandro on the list) 1027 \item \code{Nullable} types can now be assigned \code{R_NilValue} in 1028 function signatures. (PR \ghpr{395} by Dan, fixing issue \ghit{394}) 1029 \item \code{operator<<()} now always shows decimal points (PR \ghpr{396} 1030 by Dan) 1031 \item Matrix classes now have a \code{transpose()} function (PR \ghpr{397} 1032 by Dirk fixing \ghit{383}) 1033 \item \code{operator<<()} for complex types was added (PRs \ghpr{398} by 1034 Qiang and \ghpr{399} by Dirk, fixing \ghit{187}) 1035 } 1036 \item Changes in Rcpp Attributes: 1037 \itemize{ 1038 \item Enable export of C++ interface for functions that return void. 1039 } 1040 \item Changes in Rcpp Sugar: 1041 \itemize{ 1042 \item Added new Sugar function \code{cummin()}, \code{cummax()}, 1043 \code{cumprod()} (PR \ghpr{389} by Nathan Russell fixing \ghit{388}) 1044 \item Enabled sugar math operations for subsets; e.g. x[y] + x[z]. 1045 (PR \ghpr{393} by Kevin and Qiang, implementing \ghit{392}) 1046 } 1047 \item Changes in Rcpp Documentation: 1048 \itemize{ 1049 \item The \code{NEWS} file now links to GitHub issue tickets and pull 1050 requests. 1051 \item The \code{Rcpp.bib} file with bibliographic references was updated. 1052 } 1053 } 1054} 1055 1056\section{Changes in Rcpp version 0.12.1 (2015-09-10)}{ 1057 \itemize{ 1058 \item Changes in Rcpp API: 1059 \itemize{ 1060 \item Correct use of WIN32 instead of _WIN32 to please Windows 10 1061 \item Add an assignment operator to \code{DimNameProxy} (PR \ghpr{339} by Florian) 1062 \item Add vector and matrix accessors \code{.at()} with bounds checking 1063 (PR \ghpr{342} by Florian) 1064 \item Correct character vector conversion from single char (PR \ghpr{344} by 1065 Florian fixing issue \ghit{343}) 1066 \item Correct on use of \code{R_xlen_t} back to \code{size_t} (PR \ghpr{348} by 1067 Romain) 1068 \item Correct subsetting code to allow for single assignment (PR \ghpr{349} by 1069 Florian) 1070 \item Enable subset assignment on left and righ-hand side (PR \ghpr{353} by 1071 Qiang, fixing issue \ghit{345}) 1072 \item Refreshed to included \code{tinyformat} template library (PR \ghpr{357} by 1073 Dirk, issue \ghit{356}) 1074 \item Add \code{operator<<()} for vectors and matrices (PR \ghpr{361} by Dan 1075 fixing issue \ghit{239}) 1076 \item Make \code{String} and \code{String_Proxy} objects comparable (PR 1077 \ghpr{366} and PR \ghpr{372} by Dan, fixing issue \ghit{191}) 1078 \item Add a new class \code{Nullable} for objects which may be \code{NULL} 1079 (PR \ghpr{368} by Dirk and Dan, fixing issue \ghit{363}) 1080 \item Correct creation and access of large matrices (PR \ghpr{370} by Florian, 1081 fixing issue \ghit{369}) 1082 } 1083 \item Changes in Rcpp Attributes: 1084 \itemize{ 1085 \item Correctly reset directory in case of no-rebuilding but Windows code 1086 (PR \ghpr{335} by Dirk) 1087 } 1088 \item Changes in Rcpp Modules: 1089 \itemize{ 1090 \item We no longer define multiple Modules objects named \code{World} in 1091 the unit tests with was seen to have a bad effect with R 3.2.2 or later 1092 (PR \ghpr{351} by Dirk fixing issue \ghit{350}). 1093 \item Applied patch by Kurt Hornik which improves how Rcpp loads Modules 1094 (PR \ghpr{353} by Dirk) 1095 } 1096 \item Changes in Rcpp Documentation: 1097 \itemize{ 1098 \item The \code{Rcpp.bib} file with bibliographic references was updated. 1099 } 1100 } 1101} 1102 1103\section{Changes in Rcpp version 0.12.0 (2015-07-24)}{ 1104 \itemize{ 1105 \item Changes in Rcpp API: 1106 \itemize{ 1107 \item \code{Rcpp_eval()} no longer uses \code{R_ToplevelExec} when evaluating 1108 R expressions; this should resolve errors where calling handlers (e.g. 1109 through \code{suppressMessages()}) were not properly respected. 1110 \item All internal length variables have been changed from \code{R_len_t} 1111 to \code{R_xlen_t} to support vectors longer than 2^31-1 elements (via 1112 PR \ghpr{303} by Qiang Kou). 1113 \item The sugar function \code{sapply} now supports lambda functions 1114 (addressing \ghit{213} thanks to Matt Dziubinski) 1115 \item The \code{var} sugar function now uses a more robust two-pass 1116 method, supports complex numbers, with new unit tests added (via PR 1117 \ghpr{320} by Matt Dziubinski) 1118 \item \code{String} constructors now allow encodings (via PR \ghpr{310} 1119 by Qiang Kou) 1120 \item \code{String} objects are preserving the underlying \code{SEXP} 1121 objects better, and are more careful about initializations (via PRs 1122 \ghpr{322} and \ghpr{329} by Qiang Kou) 1123 \item DataFrame constructors are now a little more careful (via PR 1124 \ghpr{301} by Romain Francois) 1125 \item For R 3.2.0 or newer, \code{Rf_installChar()} is used instead of 1126 \code{Rf_install(CHAR())} (via PR \ghpr{332}). 1127 } 1128 \item Changes in Rcpp Attributes: 1129 \itemize{ 1130 \item Use more robust method of ensuring unique paths for generated shared 1131 libraries. 1132 \item The \code{evalCpp} function now also supports the \code{plugins} 1133 argument. 1134 \item Correctly handle signature termination characters ('\{' or ';') contained 1135 in quotes. 1136 } 1137 \item Changes in Rcpp Documentation: 1138 \itemize{ 1139 \item The \code{Rcpp-FAQ} vignette was once again updated with respect to 1140 OS X issues and Fortran libraries needed for e.g. \CRANpkg{RcppArmadillo}. 1141 \item The included \code{Rcpp.bib} bibtex file (which is also used by 1142 other Rcpp* packages) was updated with respect to its CRAN references. 1143 } 1144 } 1145} 1146 1147\section{Changes in Rcpp version 0.11.6 (2015-05-01)}{ 1148 \itemize{ 1149 \item Changes in Rcpp API: 1150 \itemize{ 1151 \item The unwinding of exceptions was refined to protect against inadvertent 1152 memory leaks. 1153 \item Header files now try even harder not to let macro definitions leak. 1154 \item Matrices have a new default constructor for zero-by-zero dimension 1155 matrices (via a pull request by Dmitrii Meleshko). 1156 \item A new \code{empty()} string constructor was added (via another pull 1157 request). 1158 \item Better support for Vectors with a storage policy different from the 1159 default, i.e. \code{NoProtectStorage}, was added. 1160 } 1161 \item Changes in Rcpp Attributes: 1162 \itemize{ 1163 \item Rtools 3.3 is now supported. 1164 } 1165 } 1166} 1167 1168\section{Changes in Rcpp version 0.11.5 (2015-03-04)}{ 1169 \itemize{ 1170 \item Changes in Rcpp API: 1171 \itemize{ 1172 \item An error handler for tinyformat was defined to prevent the \code{assert()} 1173 macro from spilling. 1174 \item The \code{Rcpp::warning} function was added as a wrapper for \code{Rf_warning}. 1175 \item The \code{XPtr} class was extended with new \code{checked_get} 1176 and \code{release} functions as well as improved behavior (throw an 1177 exception rather than crash) when a NULL external pointer is dereferenced. 1178 \item R code is evaluated within an \code{R_toplevelExec} block to prevent 1179 user interrupts from bypassing C++ destructors on the stack. 1180 \item The \code{Rcpp::Environment} constructor can now use a supplied 1181 parent environment. 1182 \item The \code{Rcpp::Function} constructor can now use a supplied 1183 environment or namespace. 1184 \item The \code{attributes_hidden} macro from R is used to shield internal 1185 functions; the \code{R_ext/Visibility.h} header is now included as well. 1186 \item A \code{Rcpp::print} function was added as a wrapper around \code{Rf_PrintValue}. 1187 } 1188 \item Changes in Rcpp Attributes: 1189 \itemize{ 1190 \item The \code{pkg_types.h} file is now included in \code{RcppExports.cpp} 1191 if it is present in either the \code{inst/include} or \code{src}. 1192 \item \code{sourceCpp} was modified to allow includes of local files 1193 (e.g. \code{#include "foo.hpp"}). Implementation files (*.cc; *.cpp) corresponding 1194 to local includes are also automatically built if they exist. 1195 \item The generated attributes code was simplified with respect to 1196 \code{RNGScope} and now uses \code{RObject} and its destructor rather than \code{SEXP} 1197 protect/unprotect. 1198 \item Support addition of the \code{rng} parameter in \code{Rcpp::export} 1199 to suppress the otherwise automatic inclusion of \code{RNGScope} in 1200 generated code. 1201 \item Attributes code was made more robust and can e.g. no longer recurse. 1202 \item Version 3.2 of the Rtools is now correctly detected as well. 1203 \item Allow 'R' to come immediately after '***' for defining embedded R 1204 code chunks in sourceCpp. 1205 \item The attributes vignette has been updated with documentation 1206 on new features added over the past several releases. 1207 } 1208 \item Changes in Rcpp tests: 1209 \itemize{ 1210 \item On Travis CI, all build dependencies are installed as binary 1211 \code{.deb} packages resulting in faster tests. 1212 } 1213 } 1214} 1215 1216\section{Changes in Rcpp version 0.11.4 (2015-01-20)}{ 1217 \itemize{ 1218 \item Changes in Rcpp API: 1219 \itemize{ 1220 \item The \code{ListOf<T>} class gains the \code{.attr} and 1221 \code{.names} methods common to other Rcpp vectors. 1222 \item The \code{[dpq]nbinom_mu()} scalar functions are now available via 1223 the \code{R::} namespace when R 3.1.2 or newer is used. 1224 \item Add an additional test for AIX before attempting to include \code{execinfo.h}. 1225 \item \code{Rcpp::stop} now supports improved \code{printf}-like syntax 1226 using the small tinyformat header-only library (following a similar 1227 implementation in Rcpp11) 1228 \item Pairlist objects are now protected via an additional \code{Shield<>} 1229 as suggested by Martin Morgan on the rcpp-devel list. 1230 \item Sorting is now prohibited at compile time for objects of type 1231 \code{List}, \code{RawVector} and \code{ExpressionVector}. 1232 \item Vectors now have a \code{Vector::const\_iterator} that is 'const correct' 1233 thanks to fix by Romain following a bug report in rcpp-devel by Martyn Plummer. 1234 \item The \code{mean()} sugar function now uses a more robust two-pass 1235 method, and new unit tests for \code{mean()} were added at the same time. 1236 \item The \code{mean()} and \code{var()} functions now support all core 1237 vector types. 1238 \item The \code{setequal()} sugar function has been corrected via 1239 suggestion by Qiang Kou following a bug report by Søren Højsgaard. 1240 \item The macros \code{major}, \code{minor}, and \code{makedev} no longer leak 1241 in from the (Linux) system header \code{sys/sysmacros.h}. 1242 \item The \code{push_front()} string function was corrected. 1243 } 1244 \item Changes in Rcpp Attributes: 1245 \itemize{ 1246 \item Only look for plugins in the package's namespace 1247 (rather than entire search path). 1248 \item Also scan header files for definitions of functions to be considerd 1249 by Attributes. 1250 \item Correct the regular expression for source files which are scanned. 1251 } 1252 \item Changes in Rcpp unit tests 1253 \itemize{ 1254 \item Added a new binary test which will load a pre-built package to 1255 ensure that the Application Binary Interface (ABI) did not change; this 1256 test will (mostly or) only run at Travis where we have reasonable control 1257 over the platform running the test and can provide a binary. 1258 \item New unit tests for sugar functions \code{mean}, \code{setequal} and 1259 \code{var} were added as noted above. 1260 } 1261 \item Changes in Rcpp Examples: 1262 \itemize{ 1263 \item For the (old) examples \code{ConvolveBenchmarks} and \code{OpenMP}, 1264 the respective \code{Makefile} was renamed to \code{GNUmakefile} to please 1265 \code{R CMD check} as well as the CRAN Maintainers. 1266 } 1267 } 1268} 1269 1270\section{Changes in Rcpp version 0.11.3 (2014-09-27)}{ 1271 \itemize{ 1272 \item Changes in Rcpp API: 1273 \itemize{ 1274 \item The deprecation of \code{RCPP_FUNCTION_*} which was announced with 1275 release 0.10.5 last year is proceeding as planned, and the file 1276 \code{macros/preprocessor_generated.h} has been removed. 1277 \item \code{Timer} no longer records time between steps, but times from 1278 the origin. It also gains a \code{get_timers(int)} methods that 1279 creates a vector of \code{Timer} that have the same origin. This is modelled 1280 on the \code{Rcpp11} implementation and is more useful for situations where 1281 we use timers in several threads. \code{Timer} also gains a constructor 1282 taking a \code{nanotime_t} to use as its origin, and a \code{origin} method. 1283 This can be useful for situations where the number of threads is not known 1284 in advance but we still want to track what goes on in each thread. 1285 \item A cast to \code{bool} was removed in the vector proxy code as 1286 inconsistent behaviour between clang and g++ compilations was noticed. 1287 \item A missing \code{update(SEXP)} method was added thanks to pull 1288 request by Omar Andres Zapata Mesa. 1289 \item A proxy for \code{DimNames} was added. 1290 \item A \code{no_init} option was added for Matrices and Vectors. 1291 \item The \code{InternalFunction} class was updated to work with 1292 \code{std::function} (provided a suitable C++11 compiler is available) 1293 via a pull request by Christian Authmann. 1294 \item A \code{new_env()} function was added to \code{Environment.h} 1295 \item The return value of range eraser for Vectors was fixed in a pull 1296 request by Yixuan Qiu. 1297 } 1298 \item Changes in Rcpp Sugar: 1299 \itemize{ 1300 \item In \code{ifelse()}, the returned \code{NA} type was corrected for 1301 \code{operator[]}. 1302 } 1303 \item Changes in Rcpp Attributes: 1304 \itemize{ 1305 \item Include LinkingTo in DESCRIPTION fields scanned to confirm that 1306 C++ dependencies are referenced by package. 1307 \item Add \code{dryRun} parameter to \code{sourceCpp}. 1308 \item Corrected issue with relative path and R chunk use for \code{sourceCpp}. 1309 } 1310 \item Changes in Rcpp Documentation: 1311 \itemize{ 1312 \item The \code{Rcpp-FAQ} vignette was updated with respect to OS X issues. 1313 \item A new entry in the \code{Rcpp-FAQ} clarifies the use of licenses. 1314 \item Vignettes build results no longer copied to \code{/tmp} to please CRAN. 1315 \item The Description in \code{DESCRIPTION} has been shortened. 1316 } 1317 \item Changes in Rcpp support functions: 1318 \itemize{ 1319 \item The \code{Rcpp.package.skeleton()} function will now use 1320 \CRANpkg{pkgKitten} package, if available, to create a package which passes 1321 \code{R CMD check} without warnings. A new \code{Suggests:} has been added 1322 for \CRANpkg{pkgKitten}. 1323 \item The \code{modules=TRUE} case for \code{Rcpp.package.skeleton()} has 1324 been improved and now runs without complaints from \code{R CMD check} as well. 1325 } 1326 \item Changes in Rcpp unit test functions: 1327 \itemize{ 1328 \item Functions from the \CRANpkg{RUnit} package are now prefixed with \code{RUnit::} 1329 \item The \code{testRcppModule} and \code{testRcppClass} sample packages 1330 now pass \code{R CMD check --as-cran} cleanly with NOTES or WARNINGS 1331 } 1332 } 1333} 1334 1335\section{Changes in Rcpp version 0.11.2 (2014-06-06)}{ 1336 \itemize{ 1337 \item Changes in Rcpp API: 1338 \itemize{ 1339 \item Implicit conversions, e.g. between \code{NumericVector} and 1340 \code{IntegerVector}, will now give warnings if you use 1341 \code{\#define RCPP_WARN_ON_COERCE} before including the Rcpp 1342 headers. 1343 \item Templated \code{List} containers, \code{ListOf<T>}, have been 1344 introduced. When subsetting such containers, the return is assumed 1345 to be of type T, allowing code such as 1346 \code{ListOf<NumericVector> x; NumericVector y = x[0] + x[1] + x[2]}. 1347 \item In a number of instances, returned results are protected and/or cast 1348 more carefully. 1349 } 1350 \item Changes in Rcpp Attributes 1351 \itemize{ 1352 \item Trailing line comments are now stripped by the attributes 1353 parser. This allows the parser to handle C++ source files 1354 containing comments inline with function arguments. 1355 \item The \code{USE_CXX1X} environment variable is now defined by 1356 the cpp11 plugin when R >= 3.1. Two additional plugins have been 1357 added for use with C++0x (eg when using g++ 4.6.* as on Windows) 1358 as well as C++1y for compilers beginning to support the next 1359 revision of the standard; additional fallback is provided for 1360 Windows. 1361 \item \code{compileAttributes()} now also considers Imports: which 1362 may suppress a warning when running \code{Rcpp.package.skeleton()}. 1363 } 1364 } 1365} 1366 1367\section{Changes in Rcpp version 0.11.1 (2014-03-13)}{ 1368 \itemize{ 1369 \item Changes in Rcpp API: 1370 \itemize{ 1371 \item Preserve backwards compatibility with \CRANpkg{Rcpp} 0.10.* by 1372 allowing \code{RObject} extraction from vectors (or lists) of Rcpp 1373 objects 1374 \item Add missing default constructor to Reference class that was 1375 omitted in the header-only rewrite 1376 \item Fixes for \code{NA} and \code{NaN} handling of the 1377 \code{IndexHash} class, as well as the vector \code{.sort()} 1378 method. These fixes ensure that sugar functions depending on 1379 \code{IndexHash} (i.e. \code{unique()}, \code{sort_unique()}, 1380 \code{match()}) will now properly handle \code{NA} and \code{NaN} 1381 values for numeric vectors. 1382 \item \code{DataFrame::nrows} now more accurately mimics R's 1383 internal behavior (checks the row.names attribute) 1384 \item Numerous changes to permit compilation on the Solaris OS 1385 \item Rcpp vectors gain a subsetting method -- it is now possible 1386 to subset an Rcpp vector using \code{CharacterVector}s (subset 1387 by name), \code{LogicalVector}s (logical subsetting), and 1388 \code{IntegerVector}s (0-based index subsetting). Such subsetting 1389 will also work with Rcpp sugar expressions, enabling expressions 1390 such as \code{x[ x > 0]}. 1391 \item Comma initialization (e.g. 1392 \code{CharacterVector x = "a", "b", "c";}, has been disabled, as 1393 it causes problems with the behavior of the \code{=} operator with 1394 \code{Rcpp::List}s. Users who want to re-enable this functionality 1395 can use \code{#define RCPP_COMMA_INITIALIZATION}, but be aware of 1396 the above caveat. The more verbose 1397 \code{CharacterVector x = CharacterVector::create("a", "b", "c")} 1398 is preferred. 1399 } 1400 \item Changes in Rcpp Attributes 1401 \itemize{ 1402 \item Fix issue preventing packages with \code{Rcpp::interfaces} 1403 attribute from compiling. 1404 \item Fix behavior with attributes parsing of \code{::create} for default 1405 arguments, and also allow constructors of a given size 1406 (e.g. \code{NumericVector v = NumericVector(10))} gives a default 1407 value of \code{numeric(10)} at the R level). Also make NAs preserve 1408 type when exported to R (e.g. \code{NA_STRING} as a default argument 1409 maps to \code{NA_character_} at the R level) 1410 } 1411 \item Changes in Rcpp modules 1412 \itemize{ 1413 \item Corrected the \code{un_pointer} implementation for \code{object} 1414 } 1415 } 1416} 1417 1418\section{Changes in Rcpp version 0.11.0 (2014-02-02)}{ 1419 \itemize{ 1420 \item Changes in Rcpp API: 1421 \itemize{ 1422 \item Functions provided/used by \CRANpkg{Rcpp} are now registered 1423 with R and instantiated by client package alleviating the new for 1424 explicit linking against \code{libRcpp} which is therefore no 1425 longer created. 1426 \item Updated the \code{Rcpp.package.skeleton()} function accordingly. 1427 \item New class \code{StretchyList} for pair lists with fast addition of 1428 elements at the front and back. This abstracts the 3 functions 1429 \code{NewList}, \code{GrowList} and \code{Insert} used in various 1430 packages and in parsers in R. 1431 \item The function \code{dnt}, \code{pnt}, \code{qnt} sugar 1432 functions were incorrectly expanding to the no-degree-of-freedoms 1433 variant. 1434 \item Unit tests for \code{pnt} were added. 1435 \item The sugar table function did not handle NAs and NaNs properly 1436 for numeric vectors. Fixed and tests added. 1437 \item The internal coercion mechanism mapping numerics to strings has 1438 been updated to better match \R (specifically with \code{Inf}, \code{-Inf}, 1439 and \code{NaN}.) 1440 \item Applied two bug fixes to Vector \code{sort()} and \code{RObject} 1441 definition spotted and corrected by Kevin Ushey 1442 \item New \code{checkUserInterrupt()} function that provides a C++ friendly 1443 implementation of \code{R_CheckUserInterrupt}. 1444 } 1445 \item Changes in Rcpp attributes: 1446 \itemize{ 1447 \item Embedded R code chunks in sourceCpp are now executed within 1448 the working directory of the C++ source file. 1449 \item Embedded R code chunks in sourceCpp can now be disabled. 1450 } 1451 \item Changes in Rcpp documentation: 1452 \itemize{ 1453 \item The Rcpp-FAQ and Rcpp-package vignettes have been updated and expanded. 1454 \item Vignettes are now typeset with grey background for code boxes. 1455 \item The bibtex reference file has been update to reflexct 1456 current package versions. 1457 } 1458 \item Changes in Rcpp unit tests: 1459 \itemize{ 1460 \item The file \code{tests/doRUnit.R} was rewritten following the 1461 pattern deployed in \CRANpkg{RProtoBuf} which is due to Murray Stokely 1462 \item The function \code{test()} was rewritten; it provides an 1463 easy entry point to running unit tests of the installed package 1464 } 1465 } 1466} 1467 1468\section{Changes in Rcpp version 0.10.6 (2013-10-27)}{ 1469 \itemize{ 1470 \item Changes in Rcpp API: 1471 \itemize{ 1472 \item The function \code{exposeClass} takes a description of the 1473 constructors, fields and methods to be exposed from a C++ 1474 class, and writes C++ and R files in the package. Inherited 1475 classes can be dealt with, but require data type information. 1476 This approach avoids hand-coding module files. 1477 \item Two missing \code{is<>()} templates for 1478 \code{CharacterVector} and \code{CharacterMatrix} have been added, 1479 and some tests for \code{is_na()} and \code{is_finite()} have been 1480 corrected thanks to Thomas Tse. 1481 } 1482 \item Changes in R code: 1483 \itemize{ 1484 \item Export linking helper function \code{LdFlags} as well as 1485 \code{RcppLdFlags}. 1486 \item Function \code{Rcpp.package.skeleton()} no longer passes a 1487 \code{namespace} argument on to \code{package.skeleton()} 1488 } 1489 \item Changes in R setup: 1490 \itemize{ 1491 \item Raise requirement for R itself to be version 3.0.0 or later 1492 as needed by the vignette processing 1493 } 1494 \item Changes in Rcpp attributes: 1495 \itemize{ 1496 \item \code{sourceCpp} now correctly binds to Rtools 3.0 and 3.1 1497 } 1498 } 1499} 1500 1501\section{Changes in Rcpp version 0.10.5 (2013-09-28)}{ 1502 \itemize{ 1503 \item Changes in R code: 1504 \itemize{ 1505 \item New R function \code{demangle} that calls the \code{DEMANGLE} macro. 1506 \item New R function \code{sizeof} to query the byte size of a type. This 1507 returns an object of S3 class \code{bytes} that has a \code{print} method 1508 showing bytes and bits. 1509 } 1510 \item Changes in Rcpp API: 1511 \itemize{ 1512 \item Add \code{defined(__sun)} to lists of operating systems to 1513 test for when checking for lack of \code{backtrace()} needed for 1514 stack traces. 1515 \item \code{as<T*>}, \code{as<const T*>}, \code{as<T&>} and 1516 \code{as<const T&>} are now supported, when 1517 T is a class exposed by modules, i.e. with \code{RCPP_EXPOSED_CLASS} 1518 \item \code{DoubleVector} as been added as an alias to 1519 \code{NumericVector} 1520 \item New template function \code{is<T>} to identify if an R object 1521 can be seen as a \code{T}. For example \code{is<DataFrame>(x)}. 1522 This is a building block for more expressive dispatch in various places 1523 (modules and attributes functions). 1524 \item \code{wrap} can now handle more types, i.e. types that iterate over 1525 \code{std::pair<const KEY, VALUE>} where KEY can be converted to a 1526 \code{String} and \code{VALUE} is either a primitive type (int, double) 1527 or a type that wraps. Examples : 1528 \itemize{ 1529 \item \code{std::map<int, double>} : we can make a String from an int, 1530 and double is primitive 1531 \item \code{boost::unordered_map<double, std::vector<double> >}: we can make 1532 a String from a double and \code{std::vector<double>} can wrap itself 1533 } 1534 Other examples of this are included at the end of the \code{wrap} unit test 1535 file (\code{runit.wrap.R} and \code{wrap.cpp}). 1536 \item \code{wrap} now handles containers of classes handled by modules. e.g. 1537 if you expose a class \code{Foo} via modules, then you can wrap 1538 \code{vector<Foo>}, ... An example is included in the \code{wrap} unit test 1539 file 1540 \item \code{RcppLdFlags()}, often used in \code{Makevars} files of 1541 packages using \pkg{Rcpp}, is now exported from the package namespace. 1542 } 1543 \item Changes in Attributes: 1544 \itemize{ 1545 \item Objects exported by a module (i.e. by a \code{RCPP_MODULE} call 1546 in a file that is processed by \code{sourceCpp}) are now directly 1547 available in the environment. We used to make the module object 1548 available, which was less useful. 1549 \item A plugin for \code{openmp} has been added to support use of OpenMP. 1550 \item \code{Rcpp::export} now takes advantage of the more flexible 1551 \code{as<>}, handling constness and referenceness of the input types. 1552 For users, it means that for the parameters of function exported by modules, 1553 we can now use references, pointers and const versions of them. 1554 The file \code{Module.cpp} file has an example. 1555 \item{No longer call non-exported functions from the tools package} 1556 \item{No longer search the inline package as a fallback when loading 1557 plugins for the the \code{Rcpp::plugins} attribute}. 1558 } 1559 \item Changes in Modules: 1560 \itemize{ 1561 \item We can now expose functions and methods that take 1562 \code{T&} or \code{const T&} as arguments. In these situations 1563 objects are no longer copied as they used to be. 1564 } 1565 \item Changes in sugar: 1566 \itemize{ 1567 \item \code{is_na} supports classes \code{DatetimeVector} and 1568 \code{DateVector} 1569 } 1570 \item Changes in Rcpp documentation: 1571 \itemize{ 1572 \item The vignettes have been moved from \code{inst/doc/} to the 1573 \code{vignettes} directory which is now preferred. 1574 \item The appearance of the vignettes has been refreshed by 1575 switching to the Bistream Charter font, and microtype package. 1576 } 1577 \item Deprecation of \code{RCPP_FUNCTION_*}: 1578 \itemize{ 1579 \item The macros from the \code{preprocessor_generated.h} file 1580 have been deprecated. They are still available, but they print a 1581 message in addition to their expected behavior. 1582 \item The macros will be permanently removed in the first \pkg{Rcpp} 1583 release after July 2014. 1584 \item Users of these macros should start replacing them with more 1585 up-to-date code, such as using 'Rcpp attributes' or 'Rcpp modules'. 1586 } 1587 } 1588} 1589 1590\section{Changes in Rcpp version 0.10.4 (2013-06-23)}{ 1591 \itemize{ 1592 \item Changes in R code: None beyond those detailed for Rcpp Attributes 1593 \item Changes in Rcpp attributes: 1594 \itemize{ 1595 \item Fixed problem whereby the interaction between the gc and the 1596 RNGScope destructor could cause a crash. 1597 \item Don't include package header file in generated C++ interface 1598 header files. 1599 \item Lookup plugins in \pkg{inline} package if they aren't found 1600 within the \pkg{Rcpp} package. 1601 \item Disallow compilation for files that don't have extensions 1602 supported by R CMD SHLIB 1603 } 1604 \item Changes in Rcpp API: 1605 \itemize{ 1606 \item The \code{DataFrame::create} set of functions has been reworked 1607 to just use \code{List::create} and feed to the \code{DataFrame} 1608 constructor 1609 \item The \code{operator-()} semantics for \code{Date} and 1610 \code{Datetime} are now more inline with standard C++ behaviour; 1611 with thanks to Robin Girard for the report. 1612 \item RNGScope counter now uses unsigned long rather than int. 1613 \item \code{Vector<*>::erase(iterator, iterator)} was fixed. Now 1614 it does not remove the element pointed by last (similar to what is 1615 done on stl types and what was intended initially). Reported on 1616 Rcpp-devel by Toni Giorgino. 1617 \item Added equality operator between elements of 1618 \code{CharacterVector}s. 1619 } 1620 \item Changes in Rcpp sugar: 1621 \itemize{ 1622 \item New function \code{na_omit} based on the StackOverflow thread 1623 \url{http://stackoverflow.com/questions/15953768/} 1624 \item New function \code{is_finite} and \code{is_infinite} that 1625 reproduces the behavior of R's \code{is.finite} and 1626 \code{is.infinite} functions 1627 } 1628 \item Changes in Rcpp build tools: 1629 \itemize{ 1630 \item Fix by Martyn Plummer for Solaris in handling of 1631 \code{SingleLogicalResult}. 1632 \item The \code{src/Makevars} file can now optionally override the 1633 path for \code{/usr/bin/install_name_tool} which is used on OS X. 1634 \item Vignettes are trying harder not to be built in parallel. 1635 } 1636 \item Changes in Rcpp documentation: 1637 \itemize{ 1638 \item Updated the bibliography in \code{Rcpp.bib} (which is also 1639 sourced by packages using Rcpp). 1640 \item Updated the \code{THANKS} file. 1641 } 1642 \item Planned Deprecation of \code{RCPP_FUNCTION_*}: 1643 \itemize{ 1644 \item The set of macros \code{RCPP_FUNCTION_} etc ... from the 1645 \code{preprocessor_generated.h} file will be deprecated in the next version 1646 of \pkg{Rcpp}, i.e they will still be available but will generate some 1647 warning in addition to their expected behavior. 1648 \item In the first release that is at least 12 months after this announcement, the 1649 macros will be removed from \pkg{Rcpp}. 1650 \item Users of these macros (if there are any) should start replacing them 1651 with more up to date code, such as using Rcpp attributes or Rcpp 1652 modules. 1653 } 1654 } 1655} 1656 1657\section{Changes in Rcpp version 0.10.3 (2013-03-23)}{ 1658 \itemize{ 1659 \item Changes in R code: 1660 \itemize{ 1661 \item Prevent build failures on Windowsn when Rcpp is installed 1662 in a library path with spaces (transform paths in the same manner 1663 that R does before passing them to the build system). 1664 } 1665 \item Changes in Rcpp attributes: 1666 \itemize{ 1667 \item Rcpp modules can now be used with \code{sourceCpp} 1668 \item Standalone roxygen chunks (e.g. to document a class) are now 1669 transposed into RcppExports.R 1670 \item Added \code{Rcpp::plugins} attribute for binding 1671 directly to inline plugins. Plugins can be registered using 1672 the new \code{registerPlugin} function. 1673 \item Added built-in \code{cpp11} plugin for specifying 1674 the use of C++11 in a translation unit 1675 \item Merge existing values of build related environment 1676 variables for sourceCpp 1677 \item Add global package include file to RcppExports.cpp 1678 if it exists 1679 \item Stop with an error if the file name passed to 1680 \code{sourceCpp} has spaces in it 1681 \item Return invisibly from void functions 1682 \item Ensure that line comments invalidate block comments when 1683 parsing for attributes 1684 \item Eliminated spurious empty hello world function definition 1685 in Rcpp.package.skeleton 1686 } 1687 \item Changes in Rcpp API: 1688 \itemize{ 1689 \item The very central use of R API R_PreserveObject and 1690 R_ReleaseObject has been replaced by a new system based on the 1691 functions Rcpp_PreserveObject, Rcpp_ReleaseObject and Rcpp_ReplaceObject 1692 which shows better performance and is implemented using a generic vector 1693 treated as a stack instead of a pairlist in the R 1694 implementation. However, as this preserve / release code is still 1695 a little rough at the edges, a new #define is used (in config.h) 1696 to disable it for now. 1697 \item Platform-dependent code in Timer.cpp now recognises a few 1698 more BSD variants thanks to contributed defined() test suggestions 1699 \item Support for wide character strings has been added throughout the 1700 API. In particular String, CharacterVector, wrap and as are aware of 1701 wide character strings 1702 } 1703 } 1704} 1705 1706\section{Changes in Rcpp version 0.10.2 (2012-12-21)}{ 1707 \itemize{ 1708 \item Changes in Rcpp API: 1709 \itemize{ 1710 \item Source and header files were reorganized and consolidated so 1711 that compile time are now significantly lower 1712 \item Added additional check in \code{Rstreambuf} deletetion 1713 \item Added support for \code{clang++} when using \code{libc++}, 1714 and for anc \code{icpc} in \code{std=c++11} mode, thanks to a 1715 patch by Yan Zhou 1716 \item New class \code{Rcpp::String} to facilitate working with a single 1717 element of a character vector 1718 \item New utility class sugar::IndexHash inspired from Simon 1719 Urbanek's fastmatch package 1720 \item Implementation of the equality operator between two Rcomplex 1721 \item \code{RNGScope} now has an internal counter that enables it 1722 to be safely used multiple times in the same stack frame. 1723 \item New class \code{Rcpp::Timer} for benchmarking 1724 } 1725 \item Changes in Rcpp sugar: 1726 \itemize{ 1727 \item More efficient version of \code{match} based on \code{IndexHash} 1728 \item More efficient version of \code{unique} base on \code{IndexHash} 1729 \item More efficient version of \code{in} base on \code{IndexHash} 1730 \item More efficient version of \code{duplicated} base on \code{IndexHash} 1731 \item More efficient version of \code{self_match} base on \code{IndexHash} 1732 \item New function \code{collapse} that implements paste(., collapse= "" ) 1733 } 1734 \item Changes in Rcpp attributes: 1735 \itemize{ 1736 \item Use code generation rather than modules to implement 1737 \code{sourceCpp} and \code{compileAttributes} (eliminates 1738 problem with exceptions not being able to cross shared library 1739 boundaries on Windows) 1740 \item Exported functions now automatically establish an \code{RNGScope} 1741 \item Functions exported by \code{sourceCpp} now directly 1742 reference the external function pointer rather than rely on 1743 dynlib lookup 1744 \item On Windows, Rtools is automatically added to the PATH 1745 during \code{sourceCpp} compilations 1746 \item Diagnostics are printed to the console if \code{sourceCpp} 1747 fails and C++ development tools are not installed 1748 \item A warning is printed if when \code{compileAttributes} detects 1749 \code{Rcpp::depends} attributes in source files that are not 1750 matched by Depends/LinkingTo entries in the package DESCRIPTION 1751 } 1752 } 1753} 1754 1755\section{Changes in Rcpp version 0.10.1 (2012-11-26)}{ 1756 \itemize{ 1757 \item Changes in Rcpp sugar: 1758 \itemize{ 1759 \item New functions: \code{setdiff}, \code{union_}, \code{intersect} 1760 \code{setequal}, \code{in}, \code{min}, \code{max}, \code{range}, 1761 \code{match}, \code{table}, \code{duplicated} 1762 \item New function: \code{clamp} which combines pmin and pmax, e.g. 1763 clamp( a, x, b) is the same as pmax( b, pmin(x, a) ) 1764 \item New function: \code{self_match} which implements something 1765 similar to \code{match( x, unique( x ) )} 1766 } 1767 \item Changes in Rcpp API: 1768 \itemize{ 1769 \item The \code{Vector} template class (hence \code{NumericVector} 1770 ...) get the \code{is_na} and the \code{get_na} static methods. 1771 \item New helper class \code{no_init} that can be used to 1772 create a vector without initializing its data, e.g. : 1773 \code{ IntegerVector out = no_init(n) ; } 1774 \item New exception constructor requiring only a message; \code{stop} 1775 function to throw an exception 1776 \item \code{DataFrame} gains a \code{nrows} method 1777 } 1778 \item Changes in Rcpp attributes: 1779 \itemize{ 1780 \item Ability to embed R code chunks (via specially formatted 1781 block comments) in C++ source files. 1782 \item Allow specification of argument defaults for exported functions. 1783 \item New scheme for more flexible mixing of generated and user composed 1784 C++ headers. 1785 \item Print warning if no export attributes are found in source file. 1786 \item Updated vignette with additional documentation on exposing 1787 C++ interfaces from packages and signaling errors. 1788 } 1789 \item Changes in Rcpp modules: 1790 \itemize{ 1791 \item Enclose .External invocations in \code{BEGIN_RCPP}/\code{END_RCPP} 1792 } 1793 \item Changes in R code : 1794 \itemize{ 1795 \item New function \code{areMacrosDefined} 1796 \item Additions to \code{Rcpp.package.skeleton}: 1797 \itemize{ 1798 \item \code{attributes} parameter to generate a version of 1799 \code{rcpp_hello_world} that uses \code{Rcpp::export}. 1800 \item \code{cpp_files} parameter to provide a list of C++ 1801 files to include the in the \code{src} directory of the package. 1802 } 1803 } 1804 \item Miscellaneous changes: 1805 \itemize{ 1806 \item New example 'pi simulation' using R and C++ via Rcpp attributes 1807 } 1808 } 1809} 1810\section{Changes in Rcpp version 0.10.0 (2012-11-13)}{ 1811 \itemize{ 1812 \item Support for C++11 style attributes (embedded in comments) to enable 1813 use of C++ within interactive sessions and to automatically generate module 1814 declarations for packages: 1815 \itemize{ 1816 \item Rcpp::export attribute to export a C++ function to R 1817 \item \code{sourceCpp()} function to source exported functions from a file 1818 \item \code{cppFunction()} and \code{evalCpp()} functions for inline declarations 1819 and execution 1820 \item \code{compileAttribtes()} function to generate Rcpp modules from 1821 exported functions within a package 1822 \item Rcpp::depends attribute for specifying additional build 1823 dependencies for \code{sourceCpp()} 1824 \item Rcpp::interfaces attribute to specify the external bindings 1825 \code{compileAttributes()} should generate (defaults to R-only but a 1826 C++ include file using R_GetCCallable can also be generated) 1827 \item New vignette "Rcpp-attribute" 1828 } 1829 \item Rcpp modules feature set has been expanded: 1830 \itemize{ 1831 \item Functions and methods can now return objects from classes that 1832 are exposed through modules. This uses the make_new_object template 1833 internally. This feature requires that some class traits are declared 1834 to indicate Rcpp's \code{wrap}/\code{as} system that these classes are covered 1835 by modules. The macro RCPP_EXPOSED_CLASS and RCPP_EXPOSED_CLASS_NODECL 1836 can be used to declared these type traits. 1837 \item Classes exposed through modules can also be used as parameters 1838 of exposed functions or methods. 1839 \item Exposed classes can declare factories with ".factory". A factory 1840 is a c++ function that returns a pointer to the target class. It is 1841 assumed that these objects are allocated with new on the factory. On the 1842 R side, factories are called just like other constructors, with the 1843 "new" function. This feature allows an alternative way to construct 1844 objects. 1845 \item "converter" can be used to declare a way to convert an object 1846 of a type to another type. This gets translated to the appropriate 1847 "as" method on the R side. 1848 \item Inheritance. A class can now declare that it inherits from 1849 another class with the .derives<Parent>( "Parent" ) notation. As a result 1850 the exposed class gains methods and properties (fields) from its 1851 parent class. 1852 } 1853 \item New sugar functions: 1854 \itemize{ 1855 \item \code{which_min} implements which.min. Traversing the sugar expression 1856 and returning the index of the first time the minimum value is found. 1857 \item \code{which_max} idem 1858 \item \code{unique} uses unordered_set to find unique values. In particular, 1859 the version for CharacterVector is found to be more efficient than 1860 R's version 1861 \item \code{sort_unique} calculates unique values and then sorts them. 1862 } 1863 \item Improvements to output facilities: 1864 \itemize{ 1865 \item Implemented \code{sync()} so that flushing output streams works 1866 \item Added \code{Rcerr} output stream (forwarding to 1867 \code{REprintf}) 1868 } 1869 \item Provide a namespace 'R' for the standalone Rmath library so 1870 that Rcpp users can access those functions too; also added unit tests 1871 \item Development releases sets variable RunAllRcppTests to yes to 1872 run all tests (unless it was alredy set to 'no'); CRAN releases do 1873 not and still require setting -- which helps with the desired CRAN 1874 default of less testing at the CRAN server farm. 1875 } 1876} 1877 1878\section{Changes in Rcpp version 0.9.15 (2012-10-13)}{ 1879 \itemize{ 1880 \item Untangling the clang++ build issue about the location of the 1881 exceptions header by directly checking for the include file -- an 1882 approach provided by Martin Morgan in a kindly contributed patch 1883 as unit tests for them. 1884 \item The \code{Date} and \code{Datetime} types now correctly 1885 handle \code{NA}, \code{NaN} and \code{Inf} representation; the 1886 \code{Date} type switched to an internal representation via \code{double} 1887 \item Added \code{Date} and \code{Datetime} unit tests for the new 1888 features 1889 \item An additional \code{PROTECT} was added for parsing exception 1890 messages before returning them to R, following a report by Ben North 1891 } 1892} 1893 1894\section{Changes in Rcpp version 0.9.14 (2012-09-30)}{ 1895 \itemize{ 1896 \item Added new Rcpp sugar functions trunc(), round() and signif(), as well 1897 as unit tests for them 1898 \item Be more conservative about where we support clang++ and the inclusion 1899 of exception_defines.h and prevent this from being attempted on OS X 1900 where it failed for clang 3.1 1901 \item Corrected a typo in Module.h which now again permits use of finalizers 1902 \item Small correction for (unexported) bib() function (which provides a path 1903 to the bibtex file that ships with Rcpp) 1904 \item Converted NEWS to NEWS.Rd 1905 } 1906} 1907\section{Changes in Rcpp version 0.9.13 (2012-06-28)}{ 1908 \itemize{ 1909 \item Truly corrected Rcpp::Environment class by having default constructor 1910 use the global environment, and removing the default argument of 1911 global environment from the SEXP constructor 1912 \item Added tests for clang++ version to include bits/exception_defines.h 1913 for versions 3.0 or higher (similar to g++ 4.6.0 or later), needed to 1914 include one particular exceptions header 1915 \item Made more regression tests conditional on the RunAllRcppTests to come 1916 closer to the CRAN mandate of running tests in sixty seconds 1917 \item Updated unit test wrapper tests/doRUnit.R as well as unitTests/runTests.R 1918 } 1919} 1920\section{Changes in Rcpp version 0.9.12 (2012-06-23)}{ 1921 \itemize{ 1922 \item Corrected Rcpp::Environment class by removing (empty) ctor following 1923 rev3592 (on May 2) where default argument for ctor was moved 1924 \item Unit testing now checks for environment variable RunAllRcppTests being 1925 set to "yes"; otherwise some tests are skipped. This is arguably not 1926 the right thing to do, but CRAN maintainers insist on faster tests. 1927 \item Unit test wrapper script runTests.R has new option --allTests to set 1928 the environment variable 1929 \item The cleanup script now also considers inst/unitTests/testRcppClass/src 1930 } 1931} 1932\section{Changes in Rcpp version 0.9.11 (2012-06-22)}{ 1933 \itemize{ 1934 \item New member function for vectors (and lists etc) containsElementNamed() 1935 which returns a boolean indicating if the given element name is present 1936 \item Updated the Rcpp.package.skeleton() support for Rcpp modules by 1937 carrying functions already present from the corresponding unit test 1938 which was also slightly expanded; and added more comments to the code 1939 \item Rcpp modules can now be loaded via loadRcppModules() from .onLoad(), 1940 or via loadModule("moduleName") from any R file 1941 \item Extended functionality to let R modify C++ clases imported via modules 1942 documented in help(setRcppClass) 1943 \item Support compilation in Cygwin thanks to a patch by Dario Buttari 1944 \item Extensions to the Rcpp-FAQ and the Rcpp-modules vignettes 1945 \item The minium version of R is now 2.15.1 which is required for some of 1946 the Rcpp modules support 1947 } 1948} 1949\section{Changes in Rcpp version 0.9.10 (2012-02-16)}{ 1950 \itemize{ 1951 \item Rearrange headers so that Rcpp::Rcout can be used by RcppArmadillo et al 1952 \item New Rcpp sugar function mapply (limited to two or three input vectors) 1953 \item Added custom version of the Rcpp sugar diff function for numeric vectors 1954 skipping unncesserry checks for NA 1955 \item Some internal code changes to reflect changes and stricter requirements 1956 in R CMD check in the current R-devel versions 1957 \item Corrected fixed-value initialization for IntegerVector (with thanks to 1958 Gregor Kastner for spotting this) 1959 \item New Rcpp-FAQ entry on simple way to set compiler option for cxxfunction 1960 } 1961} 1962\section{Changes in Rcpp version 0.9.9 (2012-12-25)}{ 1963 \itemize{ 1964 \item Reverting the 'int64' changes from release 0.9.8 which adversely 1965 affect packages using Rcpp: We will re-apply the 'int64' changes in a 1966 way which should cooperate more easily with 'long' and 'unsigned long'. 1967 \item Unit test output directory fallback changed to use Rcpp.Rcheck 1968 \item Conditioned two unit tests to not run on Windows where they now break 1969 whereas they passed before, and continue to pass on other OSs 1970 } 1971} 1972\section{Changes in Rcpp version 0.9.8 (2011-12-21)}{ 1973 \itemize{ 1974 \item wrap now handles 64 bit integers (int64_t, uint64_t) and containers 1975 of them, and Rcpp now depends on the int64 package (also on CRAN). 1976 This work has been sponsored by the Google Open Source Programs 1977 Office. 1978 \item Added setRcppClass() function to create extended reference classes 1979 with an interface to a C++ class (typically via Rcpp Module) which 1980 can have R-based fields and methods in addition to those from the C++. 1981 \item Applied patch by Jelmer Ypma which adds an output stream class 1982 'Rcout' not unlike std::cout, but implemented via Rprintf to 1983 cooperate with R and its output buffering. 1984 \item New unit tests for pf(), pnf(), pchisq(), pnchisq() and pcauchy() 1985 \item XPtr constructor now checks for corresponding type in SEXP 1986 \item Updated vignettes for use with updated highlight package 1987 \item Update linking command for older fastLm() example using external 1988 Armadillo 1989 } 1990} 1991\section{Changes in Rcpp version 0.9.7 (2011-09-29)}{ 1992 \itemize{ 1993 \item Applied two patches kindly provided by Martyn Plummer which provide 1994 support for compilation on Solaris using the SunPro compiler 1995 \item Minor code reorganisation in which exception specifiers are removed; 1996 this effectively only implements a run-time (rather than compile-time) 1997 check and is generally seen as a somewhat depreated C++ idiom. Thanks 1998 to Darren Cook for alerting us to this issue. 1999 \item New example 'OpenMPandInline.r' in the OpenMP/ directory, showing how 2000 easily use OpenMP by modifying the RcppPlugin output 2001 \item New example 'ifelseLooped.r' showing Rcpp can accelerate loops that may 2002 be difficult to vectorise due to dependencies 2003 \item New example directory examples/Misc/ regrouping the new example as 2004 well as the fibonacci example added in Rcpp 0.9.6 2005 \item New Rcpp-FAQ example warning of lossy conversion from 64-bit long 2006 integer types into a 53-bit mantissa which has no clear fix yet. 2007 \item New unit test for accessing a non-exported function from a namespace 2008 } 2009} 2010\section{Changes in Rcpp version 0.9.6 (2011-07-26)}{ 2011 \itemize{ 2012 \item Added helper traits to facilitate implementation of the RcppEigen 2013 package: The is_eigen_base traits identifies if a class derives from 2014 EigenBase using SFINAE; and new dispatch layer was added to wrap() to 2015 help RcppEigen 2016 \item XPtr now accepts a second template parameter, which is a function 2017 taking a pointer to the target class. This allows the developper to 2018 supply his/her own finalizer. The template parameter has a default 2019 value which retains the original behaviour (calling delete on the 2020 pointer) 2021 \item New example RcppGibbs, extending Sanjog Misra's Rcpp illustration of 2022 Darren Wilkinson's comparison of MCMC Gibbs Sampler implementations; 2023 also added short timing on Normal and Gaussian RNG draws between Rcpp 2024 and GSL as R's rgamma() is seen to significantly slower 2025 \item New example on recursively computing a Fibonacci number using Rcpp and 2026 comparing this to R and byte-compiled R for a significant speed gain 2027 } 2028} 2029\section{Changes in Rcpp version 0.9.5 (2011-07-05)}{ 2030 \itemize{ 2031 \item New Rcpp-FAQ examples on using the plugin maker for inline's 2032 cxxfunction(), and on setting row and column names for matrices 2033 \item New sugar functions: mean, var, sd 2034 \item Minor correction and extension to STL documentation in Rcpp-quickref 2035 \item wrap() is now resilient to NULL pointers passed as in const char * 2036 \item loadRcppModules() gains a "direct" argument to expose the module instead 2037 of exposing what is inside it 2038 \item Suppress a spurious warning from R CMD check on packages created with 2039 Rcpp.package.skeleton(..., module=TRUE) 2040 \item Some fixes and improvements for Rcpp sugar function 'rlnorm()' 2041 \item Beginnings of new example using OpenMP and recognising user interrupts 2042 } 2043} 2044\section{Changes in Rcpp version 0.9.4 (2011-04-12)}{ 2045 \itemize{ 2046 \item New R function "loadRcppModules" to load Rcpp modules automatically 2047 from a package. This function must be called from the .onLoad function 2048 and works with the "RcppModules" field of the package's DESCRIPTION file 2049 \item The Modules example wrapped the STL std::vector received some editing 2050 to disambiguate some symbols the newer compilers did not like 2051 \item Coercing of vectors of factors is now done with an explicit callback 2052 to R's "as.character()" as Rf_coerceVector no longer plays along 2053 \item A CITATION file for the published JSS paper has been added, and 2054 references were added to Rcpp-package.Rd and the different vignettes 2055 } 2056} 2057\section{Changes in Rcpp version 0.9.3 (2011-04-05)}{ 2058 \itemize{ 2059 \item Fixed a bug in which modules code was not behaving when compiled 2060 twice as can easily happen with inline'ed version 2061 \item Exceptions code includes exception_defines.h only when g++ is 4.5 or 2062 younger as the file no longer exists with g++-4.6 2063 \item The documentation Makefile now uses the $R_HOME environment variable 2064 \item The documentation Makefile no longer calls clean in the all target 2065 \item C++ conformance issue found by clang/llvm addressed by re-ordering 2066 declarations in grow.h as unqualified names must be declared before 2067 they are used, even when used within templates 2068 \item The 'long long' typedef now depends on C++0x being enabled as this 2069 was not a feature in C++98; this suppresses a new g++-4.5 warning 2070 \item The Rcpp-introduction vignette was updated to the forthcoming JSS paper 2071 } 2072} 2073\section{Changes in Rcpp version 0.9.2 (2011-02-23)}{ 2074 \itemize{ 2075 \item The unitTest runit.Module.client.package.R is now skipped on older OS 2076 X releases as it triggers a bug with g++ 4.2.1 or older; OS X 10.6 is 2077 fine but as it no longer support ppc we try to accomodate 10.5 too 2078 Thanks to Simon Urbanek for pinning this down and Baptiste Auguie 2079 and Ken Williams for additonal testing 2080 \item RcppCommon.h now recognises the Intel Compiler thanks to a short 2081 patch by Alexey Stukalov; this turns off Cxx0x and TR1 features too 2082 \item Three more setup questions were added to the Rcpp-FAQ vignette 2083 \item One question about RcppArmadillo was added to the Rcpp-FAQ vignette 2084 } 2085} 2086\section{Changes in Rcpp version 0.9.1 (2011-02-14)}{ 2087 \itemize{ 2088 \item A number of internal changes to the memory allocation / protection of 2089 temporary objects were made---with a heartfelt "Thank You!" to both 2090 Doug Bates for very persistent debugging of Rcpp modules code, and to 2091 Luke Tierney who added additional memory allocation debugging tools 2092 to R-devel (which will be in R 2.13.0 and may also be in R 2.12.2) 2093 \item Removed another GNU Make-specific variable from src/Makevars in order 2094 to make the build more portable; this was noticed on FreeBSD 2095 \item On *BSD, do not try to compute a stack trace but provide file and 2096 line number (which is the same behaviour as implemented in Windows) 2097 \item Fixed an int conversion bug reported by Daniel Sabanes Bove on r-devel, 2098 added unit test as well 2099 \item Added unit tests for complex-typed vectors (thanks to Christian Gunning) 2100 \item Expanded the Rcpp-quickref vignette (with thanks to Christian Gunning) 2101 \item Additional examples were added to the Rcpp-FAQ vignette 2102 } 2103} 2104\section{Changes in Rcpp version 0.9.0 (2010-12-19)}{ 2105 \itemize{ 2106 \item The classic API was factored out into its own package RcppClassic which 2107 is released concurrently with this version. 2108 \item If an object is created but not initialized, attempting to use 2109 it now gives a more sensible error message (by forwarding an 2110 Rcpp::not_initialized exception to R). 2111 \item SubMatrix fixed, and Matrix types now have a nested ::Sub typedef. 2112 \item New unexported function SHLIB() to aid in creating a shared library on 2113 the command-line or in Makefile (similar to CxxFlags() / LdFlags()). 2114 \item Module gets a seven-argument ctor thanks to a patch from Tama Ma. 2115 \item The (still incomplete) QuickRef vignette has grown thanks to a patch 2116 by Christian Gunning. 2117 \item Added a sprintf template intended for logging and error messages. 2118 \item Date::getYear() corrected (where addition of 1900 was not called for); 2119 corresponding change in constructor from three ints made as well. 2120 \item Date() and Datetime() constructors from string received a missing 2121 conversion to int and double following strptime. The default format 2122 string for the Datetime() strptime call was also corrected. 2123 \item A few minor fixes throughout, see ChangeLog. 2124 } 2125} 2126\section{Changes in Rcpp version 0.8.9 (2010-11-27)}{ 2127 \itemize{ 2128 \item Many improvements were made in 'Rcpp modules': 2129 - exposing multiple constructors 2130 - overloaded methods 2131 - self-documentation of classes, methods, constructors, fields and 2132 functions. 2133 - new R function "populate" to facilitate working with modules in 2134 packages. 2135 - formal argument specification of functions. 2136 - updated support for Rcpp.package.skeleton. 2137 - constructors can now take many more arguments. 2138 \item The 'Rcpp-modules' vignette was updated as well and describe many 2139 of the new features 2140 \item New template class Rcpp::SubMatrix<RTYPE> and support syntax in Matrix 2141 to extract a submatrix: 2142 NumericMatrix x = ... ; 2143 // extract the first three columns 2144 SubMatrix<REALSXP> y = x( _ , Range(0,2) ) ; 2145 // extract the first three rows 2146 SubMatrix<REALSXP> y = x( Range(0,2), _ ) ; 2147 // extract the top 3x3 sub matrix 2148 SubMatrix<REALSXP> y = x( Range(0,2), Range(0,2) ) ; 2149 \item Reference Classes no longer require a default constructor for 2150 subclasses of C++ classes 2151 \item Consistently revert to using backticks rather than shell expansion 2152 to compute library file location when building packages against Rcpp 2153 on the default platforms; this has been applied to internal test 2154 packages as well as CRAN/BioC packages using Rcpp 2155 } 2156} 2157\section{Changes in Rcpp version 0.8.8 (2010-11-01)}{ 2158 \itemize{ 2159 \item New syntactic shortcut to extract rows and columns of a Matrix. 2160 x(i,_) extracts the i-th row and x(_,i) extracts the i-th column. 2161 \item Matrix indexing is more efficient. However, faster indexing is 2162 disabled if g++ 4.5.0 or later is used. 2163 \item A few new Rcpp operators such as cumsum, operator=(sugar) 2164 \item Variety of bug fixes: 2165 - column indexing was incorrect in some cases 2166 - compilation using clang/llvm (thanks to Karl Millar for the patch) 2167 - instantation order of Module corrected 2168 - POSIXct, POSIXt now correctly ordered for R 2.12.0 2169 } 2170} 2171\section{Changes in Rcpp version 0.8.7 (2010-10-15)}{ 2172 \itemize{ 2173 \item As of this version, Rcpp depends on R 2.12 or greater as it interfaces 2174 the new reference classes (see below) and also reflects the POSIXt 2175 class reordering both of which appeared with R version 2.12.0 2176 \item new Rcpp::Reference class, that allows internal manipulation of R 2177 2.12.0 reference classes. The class exposes a constructor that takes 2178 the name of the target reference class and a field(string) method 2179 that implements the proxy pattern to get/set reference fields using 2180 callbacks to the R operators "$" and "$<-" in order to preserve the 2181 R-level encapsulation 2182 \item the R side of the preceding item allows methods to be written in R as 2183 per ?ReferenceClasses, accessing fields by name and assigning them 2184 using "<<-". Classes extracted from modules are R reference classes. 2185 They can be subclassed in R, and/or R methods can be defined using 2186 the $methods(...) mechanism. 2187 \item internal performance improvements for Rcpp sugar as well as an added 2188 'noNA()' wrapper to omit tests for NA values -- see the included 2189 examples in inst/examples/convolveBenchmarks for the speedups 2190 \item more internal performance gains with Functions and Environments 2191 } 2192} 2193\section{Changes in Rcpp version 0.8.6 (2010-09-09)}{ 2194 \itemize{ 2195 \item new macro RCPP_VERSION and Rcpp_Version to allow conditional compiling 2196 based on the version of Rcpp 2197 #if defined(RCPP_VERSION) && RCPP_VERSION >= Rcpp_Version(0,8,6) 2198 #endif 2199 \item new sugar functions for statistical distributions (d-p-q-r functions) 2200 with distributions : unif, norm, gamma, chisq, lnorm, weibull, logis, 2201 f, pois, binom, t, beta. 2202 \item new ctor for Vector taking size and function pointer so that for example 2203 NumericVector( 10, norm_rand ) 2204 generates a N(0,1) vector of size 10 2205 \item added binary operators for complex numbers, as well as sugar support 2206 \item more sugar math functions: sqrt, log, log10, exp, sin, cos, ... 2207 \item started new vignette Rcpp-quickref : quick reference guide of Rcpp API 2208 (still work in progress) 2209 \item various patches to comply with solaris/suncc stricter standards 2210 \item minor enhancements to ConvolutionBenchmark example 2211 \item simplified src/Makefile to no longer require GNU make; packages using 2212 Rcpp still do for the compile-time test of library locations 2213 } 2214} 2215\section{Changes in Rcpp version 0.8.5 (2010-07-25)}{ 2216 \itemize{ 2217 \item speed improvements. Vector::names, RObject::slot have been improved 2218 to take advantage of R API functions instead of callbacks to R 2219 \item Some small updates to the Rd-based documentation which now points to 2220 content in the vignettes. Also a small formatting change to suppress 2221 a warning from the development version of R. 2222 \item Minor changes to Date() code which may reenable SunStudio builds 2223 } 2224} 2225\section{Changes in Rcpp version 0.8.4 (2010-07-09)}{ 2226 \itemize{ 2227 \item new sugar vector functions: rep, rep_len, rep_each, rev, head, tail, 2228 diag 2229 \item sugar has been extended to matrices: The Matrix class now extends the 2230 Matrix_Base template that implements CRTP. Currently sugar functions 2231 for matrices are: outer, col, row, lower_tri, upper_tri, diag 2232 \item The unit tests have been reorganised into fewer files with one call 2233 each to cxxfunction() (covering multiple tests) resulting in a 2234 significant speedup 2235 \item The Date class now uses the same mktime() replacement that R uses 2236 (based on original code from the timezone library by Arthur Olson) 2237 permitting wide date ranges on all operating systems 2238 \item The FastLM example has been updated, a new benchmark based on the 2239 historical Longley data set has been added 2240 \item RcppStringVector now uses std::vector<std::string> internally 2241 \item setting the .Data slot of S4 objects did not work properly 2242 } 2243} 2244\section{Changes in Rcpp version 0.8.3 (2010-06-27)}{ 2245 \itemize{ 2246 \item This release adds Rcpp sugar which brings (a subset of) the R syntax 2247 into C++. This supports : 2248 - binary operators : <,>,<=,>=,==,!= between R vectors 2249 - arithmetic operators: +,-,*,/ between compatible R vectors 2250 - several functions that are similar to the R function of the same name: 2251 abs, all, any, ceiling, diff, exp, ifelse, is_na, lapply, pmin, pmax, 2252 pow, sapply, seq_along, seq_len, sign 2253 Simple examples : 2254 // two numeric vector of the same size 2255 NumericVector x ; 2256 NumericVector y ; 2257 NumericVector res = ifelse( x < y, x*x, -(y*y) ) ; 2258 // sapply'ing a C++ function 2259 double square( double x )\{ return x*x ; \} 2260 NumericVector res = sapply( x, square ) ; 2261 Rcpp sugar uses the technique of expression templates, pioneered by the 2262 Blitz++ library and used in many libraries (Boost::uBlas, Armadillo). 2263 Expression templates allow lazy evaluation of expressions, which 2264 coupled with inlining generates very efficient code, very closely 2265 approaching the performance of hand written loop code, and often 2266 much more efficient than the equivalent (vectorized) R code. 2267 Rcpp sugar is curently limited to vectors, future releases will 2268 include support for matrices with sugar functions such as outer, etc ... 2269 Rcpp sugar is documented in the Rcpp-sugar vignette, which contains 2270 implementation details. 2271 \item New helper function so that "Rcpp?something" brings up Rcpp help 2272 \item Rcpp Modules can now expose public data members 2273 \item New classes Date, Datetime, DateVector and DatetimeVector with proper 2274 'new' API integration such as as(), wrap(), iterators, ... 2275 \item The so-called classic API headers have been moved to a subdirectory 2276 classic/ This should not affect client-code as only Rcpp.h was ever 2277 included. 2278 \item RcppDate now has a constructor from SEXP as well 2279 \item RcppDateVector and RcppDatetimeVector get constructors from int 2280 and both const / non-const operator(int i) functions 2281 \item New API class Rcpp::InternalFunction that can expose C++ functions 2282 to R without modules. The function is exposed as an S4 object of 2283 class C++Function 2284 } 2285} 2286\section{Changes in Rcpp version 0.8.2 (2010-06-09)}{ 2287 \itemize{ 2288 \item Bug-fix release for suncc compiler with thanks to Brian Ripley for 2289 additional testing. 2290 } 2291} 2292\section{Changes in Rcpp version 0.8.1 (2010-06-08)}{ 2293 \itemize{ 2294 \item This release adds Rcpp modules. An Rcpp module is a collection of 2295 internal (C++) functions and classes that are exposed to R. This 2296 functionality has been inspired by Boost.Python. 2297 Modules are created internally using the RCPP_MODULE macro and 2298 retrieved in the R side with the Module function. This is a preview 2299 release of the module functionality, which will keep improving until 2300 the Rcpp 0.9.0 release. 2301 The new vignette "Rcpp-modules" documents the current feature set of 2302 Rcpp modules. 2303 \item The new vignette "Rcpp-package" details the steps involved in making a 2304 package that uses Rcpp. 2305 \item The new vignette "Rcpp-FAQ" collects a number of frequently asked 2306 questions and answers about Rcpp. 2307 \item The new vignette "Rcpp-extending" documents how to extend Rcpp 2308 with user defined types or types from third party libraries. Based on 2309 our experience with RcppArmadillo 2310 \item Rcpp.package.skeleton has been improved to generate a package using 2311 an Rcpp module, controlled by the "module" argument 2312 \item Evaluating a call inside an environment did not work properly 2313 \item cppfunction has been withdrawn since the introduction of the more 2314 flexible cxxfunction in the inline package (0.3.5). Rcpp no longer 2315 depends on inline since many uses of Rcpp do not require inline at 2316 all. We still use inline for unit tests but this is now handled 2317 locally in the unit tests loader runTests.R. 2318 Users of the now-withdrawn function cppfunction can redefine it as: 2319 cppfunction <- function(...) cxxfunction( ..., plugin = "Rcpp" ) 2320 \item Support for std::complex was incomplete and has been enhanced. 2321 \item The methods XPtr<T>::getTag and XPtr<T>::getProtected are deprecated, 2322 and will be removed in Rcpp 0.8.2. The methods tag() and prot() should 2323 be used instead. tag() and prot() support both LHS and RHS use. 2324 \item END_RCPP now returns the R Nil values; new macro VOID_END_RCPP 2325 replicates prior behabiour 2326 } 2327} 2328\section{Changes in Rcpp version 0.8.0 (2010-05-17)}{ 2329 \itemize{ 2330 \item All Rcpp headers have been moved to the inst/include directory, 2331 allowing use of 'LinkingTo: Rcpp'. But the Makevars and Makevars.win 2332 are still needed to link against the user library. 2333 \item Automatic exception forwarding has been withdrawn because of 2334 portability issues (as it did not work on the Windows platform). 2335 Exception forwarding is still possible but is now based on explicit 2336 code of the form: 2337 try \{ 2338 // user code 2339 \} catch( std::exception& __ex__)\{ 2340 forward_exception_to_r( __ex___ ) ; 2341 Alternatively, the macro BEGIN_RCPP and END_RCPP can use used to enclose 2342 code so that it captures exceptions and forward them to R. 2343 BEGIN_RCPP 2344 // user code 2345 END_RCPP 2346 \item new __experimental__ macros 2347 The macros RCPP_FUNCTION_0, ..., RCPP_FUNCTION_65 to help creating C++ 2348 functions hiding some code repetition: 2349 RCPP_FUNCTION_2( int, foobar, int x, int y)\{ 2350 return x + y ; 2351 The first argument is the output type, the second argument is the 2352 name of the function, and the other arguments are arguments of the 2353 C++ function. Behind the scenes, the RCPP_FUNCTION_2 macro creates an 2354 intermediate function compatible with the .Call interface and handles 2355 exceptions 2356 Similarly, the macros RCPP_FUNCTION_VOID_0, ..., RCPP_FUNCTION_VOID_65 2357 can be used when the C++ function to create returns void. The generated 2358 R function will return R_NilValue in this case. 2359 RCPP_FUNCTION_VOID_2( foobar, std::string foo )\{ 2360 // do something with foo 2361 The macro RCPP_XP_FIELD_GET generates a .Call compatible function that 2362 can be used to access the value of a field of a class handled by an 2363 external pointer. For example with a class like this: 2364 class Foo\{ 2365 public: 2366 int bar ; 2367 RCPP_XP_FIELD_GET( Foo_bar_get, Foo, bar ) ; 2368 RCPP_XP_FIELD_GET will generate the .Call compatible function called 2369 Foo_bar_get that can be used to retrieved the value of bar. 2370 The macro RCPP_FIELD_SET generates a .Call compatible function that 2371 can be used to set the value of a field. For example: 2372 RCPP_XP_FIELD_SET( Foo_bar_set, Foo, bar ) ; 2373 generates the .Call compatible function called "Foo_bar_set" that 2374 can be used to set the value of bar 2375 The macro RCPP_XP_FIELD generates both getter and setter. For example 2376 RCPP_XP_FIELD( Foo_bar, Foo, bar ) 2377 generates the .Call compatible Foo_bar_get and Foo_bar_set using the 2378 macros RCPP_XP_FIELD_GET and RCPP_XP_FIELD_SET previously described 2379 The macros RCPP_XP_METHOD_0, ..., RCPP_XP_METHOD_65 faciliate 2380 calling a method of an object that is stored in an external pointer. For 2381 example: 2382 RCPP_XP_METHOD_0( foobar, std::vector<int> , size ) 2383 creates the .Call compatible function called foobar that calls the 2384 size method of the std::vector<int> class. This uses the Rcpp::XPtr< 2385 std::vector<int> > class. 2386 The macros RCPP_XP_METHOD_CAST_0, ... is similar but the result of 2387 the method called is first passed to another function before being 2388 wrapped to a SEXP. For example, if one wanted the result as a double 2389 RCPP_XP_METHOD_CAST_0( foobar, std::vector<int> , size, double ) 2390 The macros RCPP_XP_METHOD_VOID_0, ... are used when calling the 2391 method is only used for its side effect. 2392 RCPP_XP_METHOD_VOID_1( foobar, std::vector<int>, push_back ) 2393 Assuming xp is an external pointer to a std::vector<int>, this could 2394 be called like this : 2395 .Call( "foobar", xp, 2L ) 2396 \item Rcpp now depends on inline (>= 0.3.4) 2397 \item A new R function "cppfunction" was added which invokes cfunction from 2398 inline with focus on Rcpp usage (enforcing .Call, adding the Rcpp 2399 namespace, set up exception forwarding). cppfunction uses BEGIN_RCPP 2400 and END_RCPP macros to enclose the user code 2401 \item new class Rcpp::Formula to help building formulae in C++ 2402 \item new class Rcpp::DataFrame to help building data frames in C++ 2403 \item Rcpp.package.skeleton gains an argument "example_code" and can now be 2404 used with an empty list, so that only the skeleton is generated. It 2405 has also been reworked to show how to use LinkingTo: Rcpp 2406 \item wrap now supports containers of the following types: long, long double, 2407 unsigned long, short and unsigned short which are silently converted 2408 to the most acceptable R type. 2409 \item Revert to not double-quote protecting the path on Windows as this 2410 breaks backticks expansion used n Makevars.win etc 2411 \item Exceptions classes have been moved out of Rcpp classes, 2412 e.g. Rcpp::RObject::not_a_matrix is now Rcpp::not_a_matrix 2413 } 2414} 2415\section{Changes in Rcpp version 0.7.12 (2010-04-16)}{ 2416 \itemize{ 2417 \item Undo shQuote() to protect Windows path names (which may contain 2418 spaces) as backticks use is still broken; use of $(shell ...) works 2419 } 2420} 2421\section{Changes in Rcpp version 0.7.11 (2010-03-26)}{ 2422 \itemize{ 2423 \item Vector<> gains a set of templated factory methods "create" which 2424 takes up to 20 arguments and can create named or unnamed vectors. 2425 This greatly facilitates creating objects that are returned to R. 2426 \item Matrix now has a diag() method to create diagonal matrices, and 2427 a new constructor using a single int to create square matrices 2428 \item Vector now has a new fill() method to propagate a single value 2429 \item Named is no more a class but a templated function. Both interfaces 2430 Named(.,.) and Named(.)=. are preserved, and extended to work also on 2431 simple vectors (through Vector<>::create) 2432 \item Applied patch by Alistair Gee to make ColDatum more robust 2433 \item Fixed a bug in Vector that caused random behavior due to the lack of 2434 copy constructor in the Vector template 2435 } 2436} 2437\section{Changes in Rcpp version 0.7.10 (2010-03-15)}{ 2438 \itemize{ 2439 \item new class Rcpp::S4 whose constructor checks if the object is an S4 2440 object 2441 \item maximum number of templated arguments to the pairlist function, the 2442 DottedPair constructor, the Language constructor and the Pairlist 2443 constructor has been updated to 20 (was 5) and a script has been 2444 added to the source tree should we want to change it again 2445 \item use shQuote() to protect Windows path names (which may contain spaces) 2446 } 2447} 2448\section{Changes in Rcpp version 0.7.9 (2010-03-12)}{ 2449 \itemize{ 2450 \item Another small improvement to Windows build flags 2451 \item bugfix on 64 bit platforms. The traits classes (wrap_type_traits, etc) 2452 used size_t when they needed to actually use unsigned int 2453 \item fixed pre gcc 4.3 compatibility. The trait class that was used to 2454 identify if a type is convertible to another had too many false 2455 positives on pre gcc 4.3 (no tr1 or c++0x features). fixed by 2456 implementing the section 2.7 of "Modern C++ Design" book. 2457 } 2458} 2459\section{Changes in Rcpp version 0.7.8 (2010-03-09)}{ 2460 \itemize{ 2461 \item All vector classes are now generated from the same template class 2462 Rcpp::Vector<int RTYPE> where RTYPE is one of LGLSXP, RAWSXP, STRSXP, 2463 INTSXP, REALSXP, CPLXSXP, VECSXP and EXPRSXP. typedef are still 2464 available : IntegerVector, ... All vector classes gain methods 2465 inspired from the std::vector template : push_back, push_front, 2466 erase, insert 2467 \item New template class Rcpp::Matrix<RTYPE> deriving from 2468 Rcpp::Vector<RTYPE>. These classes have the same functionality 2469 as Vector but have a different set of constructors which checks 2470 that the input SEXP is a matrix. Matrix<> however does/can not 2471 guarantee that the object will allways be a matrix. typedef 2472 are defined for convenience: Matrix<INTSXP> is IntegerMatrix, etc... 2473 \item New class Rcpp::Row<int RTYPE> that represents a row of a matrix 2474 of the same type. Row contains a reference to the underlying 2475 Vector and exposes a nested iterator type that allows use of 2476 STL algorithms on each element of a matrix row. The Vector class 2477 gains a row(int) method that returns a Row instance. Usage 2478 examples are available in the runit.Row.R unit test file 2479 \item New class Rcpp::Column<int RTYPE> that represents a column of a 2480 matrix. (similar to Rcpp::Row<int RTYPE>). Usage examples are 2481 available in the runit.Column.R unit test file 2482 \item The Rcpp::as template function has been reworked to be more 2483 generic. It now handles more STL containers, such as deque and 2484 list, and the genericity can be used to implement as for more 2485 types. The package RcppArmadillo has examples of this 2486 \item new template class Rcpp::fixed_call that can be used in STL algorithms 2487 such as std::generate. 2488 \item RcppExample et al have been moved to a new package RcppExamples; 2489 src/Makevars and src/Makevars.win simplified accordingly 2490 \item New class Rcpp::StringTransformer and helper function 2491 Rcpp::make_string_transformer that can be used to create a function 2492 that transforms a string character by character. For example 2493 Rcpp::make_string_transformer(tolower) transforms each character 2494 using tolower. The RcppExamples package has an example of this. 2495 \item Improved src/Makevars.win thanks to Brian Ripley 2496 \item New examples for 'fast lm' using compiled code: 2497 - using GNU GSL and a C interface 2498 - using Armadillo (http://arma.sf.net) and a C++ interface 2499 Armadillo is seen as faster for lack of extra copying 2500 \item A new package RcppArmadillo (to be released shortly) now serves 2501 as a concrete example on how to extend Rcpp to work with a modern 2502 C++ library such as the heavily-templated Armadillo library 2503 \item Added a new vignette 'Rcpp-introduction' based on a just-submitted 2504 overview article on Rcpp 2505 } 2506} 2507\section{Changes in Rcpp version 0.7.7 (2010-02-14)}{ 2508 \itemize{ 2509 \item new template classes Rcpp::unary_call and Rcpp::binary_call 2510 that facilitates using R language calls together 2511 with STL algorithms. 2512 \item fixed a bug in Language constructors taking a string as their 2513 first argument. The created call was wrong. 2514 } 2515} 2516\section{Changes in Rcpp version 0.7.6 (2010-02-12)}{ 2517 \itemize{ 2518 \item SEXP_Vector (and ExpressionVector and GenericVector, a.k.a List) now 2519 have methods push_front, push_back and insert that are templated 2520 \item SEXP_Vector now has int- and range-valued erase() members 2521 \item Environment class has a default constructor (for RInside) 2522 \item SEXP_Vector_Base factored out of SEXP_Vector (Effect. C++ #44) 2523 \item SEXP_Vector_Base::iterator added as well as begin() and end() 2524 so that STL algorithms can be applied to Rcpp objects 2525 \item CharacterVector gains a random access iterator, begin() and end() to 2526 support STL algorithms; iterator dereferences to a StringProxy 2527 \item Restore Windows build; successfully tested on 32 and 64 bit; 2528 \item Small fixes to inst/skeleton files for bootstrapping a package 2529 \item RObject::asFoo deprecated in favour of Rcpp::as<Foo> 2530 } 2531} 2532\section{Changes in Rcpp version 0.7.5 (2010-02-08)}{ 2533 \itemize{ 2534 \item wrap has been much improved. wrappable types now are : 2535 - primitive types : int, double, Rbyte, Rcomplex, float, bool 2536 - std::string 2537 - STL containers which have iterators over wrappable types: 2538 (e.g. std::vector<T>, std::deque<T>, std::list<T>, etc ...). 2539 - STL maps keyed by std::string, e.g std::map<std::string,T> 2540 - classes that have implicit conversion to SEXP 2541 - classes for which the wrap template if fully or partly specialized 2542 This allows composition, so for example this class is wrappable: 2543 std::vector< std::map<std::string,T> > (if T is wrappable) 2544 \item The range based version of wrap is now exposed at the Rcpp:: 2545 level with the following interface : 2546 Rcpp::wrap( InputIterator first, InputIterator last ) 2547 This is dispatched internally to the most appropriate implementation 2548 using traits 2549 \item a new namespace Rcpp::traits has been added to host the various 2550 type traits used by wrap 2551 \item The doxygen documentation now shows the examples 2552 \item A new file inst/THANKS acknowledges the kind help we got from others 2553 \item The RcppSexp has been removed from the library. 2554 \item The methods RObject::asFoo are deprecated and will be removed 2555 in the next version. The alternative is to use as<Foo>. 2556 \item The method RObject::slot can now be used to get or set the 2557 associated slot. This is one more example of the proxy pattern 2558 \item Rcpp::VectorBase gains a names() method that allows getting/setting 2559 the names of a vector. This is yet another example of the 2560 proxy pattern. 2561 \item Rcpp::DottedPair gains templated operator<< and operator>> that 2562 allow wrap and push_back or wrap and push_front of an object 2563 \item Rcpp::DottedPair, Rcpp::Language, Rcpp::Pairlist are less 2564 dependent on C++0x features. They gain constructors with up 2565 to 5 templated arguments. 5 was choosed arbitrarily and might 2566 be updated upon request. 2567 \item function calls by the Rcpp::Function class is less dependent 2568 on C++0x. It is now possible to call a function with up to 2569 5 templated arguments (candidate for implicit wrap) 2570 \item added support for 64-bit Windows (thanks to Brian Ripley and Uwe Ligges) 2571 } 2572} 2573\section{Changes in Rcpp version 0.7.4 (2010-01-30)}{ 2574 \itemize{ 2575 \item matrix-like indexing using operator() for all vector 2576 types : IntegerVector, NumericVector, RawVector, CharacterVector 2577 LogicalVector, GenericVector and ExpressionVector. 2578 \item new class Rcpp::Dimension to support creation of vectors with 2579 dimensions. All vector classes gain a constructor taking a 2580 Dimension reference. 2581 \item an intermediate template class "SimpleVector" has been added. All 2582 simple vector classes are now generated from the SimpleVector 2583 template : IntegerVector, NumericVector, RawVector, CharacterVector 2584 LogicalVector. 2585 \item an intermediate template class "SEXP_Vector" has been added to 2586 generate GenericVector and ExpressionVector. 2587 \item the clone template function was introduced to explicitely 2588 clone an RObject by duplicating the SEXP it encapsulates. 2589 \item even smarter wrap programming using traits and template 2590 meta-programming using a private header to be include only 2591 RcppCommon.h 2592 \item the as template is now smarter. The template now attempts to 2593 build an object of the requested template parameter T by using the 2594 constructor for the type taking a SEXP. This allows third party code 2595 to create a class Foo with a constructor Foo(SEXP) to have 2596 as<Foo> for free. 2597 \item wrap becomes a template. For an object of type T, wrap<T> uses 2598 implicit conversion to SEXP to first convert the object to a SEXP 2599 and then uses the wrap(SEXP) function. This allows third party 2600 code creating a class Bar with an operator SEXP() to have 2601 wrap for free. 2602 \item all specializations of wrap : wrap<double>, wrap< vector<double> > 2603 use coercion to deal with missing values (NA) appropriately. 2604 \item configure has been withdrawn. C++0x features can now be activated 2605 by setting the RCPP_CXX0X environment variable to "yes". 2606 \item new template r_cast<int> to facilitate conversion of one SEXP 2607 type to another. This is mostly intended for internal use and 2608 is used on all vector classes 2609 \item Environment now takes advantage of the augmented smartness 2610 of as and wrap templates. If as<Foo> makes sense, one can 2611 directly extract a Foo from the environment. If wrap<Bar> makes 2612 sense then one can insert a Bar directly into the environment. 2613 Foo foo = env["x"] ; /* as<Foo> is used */ 2614 Bar bar ; 2615 env["y"] = bar ; /* wrap<Bar> is used */ 2616 \item Environment::assign becomes a template and also uses wrap to 2617 create a suitable SEXP 2618 \item Many more unit tests for the new features; also added unit tests 2619 for older API 2620 } 2621} 2622\section{Changes in Rcpp version 0.7.3 (2010-01-21)}{ 2623 \itemize{ 2624 \item New R function Rcpp.package.skeleton, modelled after 2625 utils::package.skeleton to help creating a package with support 2626 for Rcpp use. 2627 \item indexing is now faster for simple vectors due to inlining of 2628 the operator[] and caching the array pointer 2629 \item The class Rcpp::VectorBase was introduced. All vector classes 2630 derive from it. The class handles behaviour that is common 2631 to all vector types: length, names, etc ... 2632 \item exception forwarding is extended to compilers other than GCC 2633 but default values are used for the exception class 2634 and the exception message, because we don't know how to do it. 2635 \item Improved detection of C++0x capabilities 2636 \item Rcpp::Pairlist gains a default constructor 2637 \item Rcpp::Environment gains a new_child method to create a new 2638 environment whose parent is this 2639 \item Rcpp::Environment::Binding gains a templated implicit 2640 conversion operator 2641 \item Rcpp::ExpressionVector gains an eval method to evaluate itself 2642 \item Rcpp::ExpressionVector gains a constructor taking a std::string 2643 representing some R code to parse. 2644 \item Rcpp::GenericVector::Proxy gains an assignment operator to deal 2645 with Environment::Proxy objects 2646 \item Rcpp::LdFlags() now defaults to static linking OS X, as it already 2647 did on Windows; this default can be overridden. 2648 } 2649} 2650\section{Changes in Rcpp version 0.7.2 (2010-01-12)}{ 2651 \itemize{ 2652 \item a new benchmark was added to the examples directory 2653 around the classic convolution example from 2654 Writing R extensions to compare C and C++ implementations 2655 \item Rcpp::CharacterVector::StringProxy gains a += operator 2656 \item Rcpp::Environment gains an operator[](string) to get/set 2657 objects from the environment. operator[] returns an object 2658 of class Rcpp::Environment::Binding which implements the proxy 2659 pattern. Inspired from Item 30 of 'More Effective C++' 2660 \item Rcpp::Pairlist and Rcpp::Language gain an operator[](int) 2661 also using the proxy pattern 2662 \item Rcpp::RObject.attr can now be used on the rhs or the lhs, to get 2663 or set an attribute. This also uses the proxy pattern 2664 \item Rcpp::Pairlist and Rcpp::Language gain new methods push_back 2665 replace, length, size, remove, insert 2666 \item wrap now returns an object of a suitable class, not just RObject 2667 anymore. For example wrap( bool ) returns a LogicalVector 2668 \item Rcpp::RObject gains methods to deal with S4 objects : isS4, 2669 slot and hasSlot 2670 \item new class Rcpp::ComplexVector to manage complex vectors (CPLXSXP) 2671 \item new class Rcpp::Promise to manage promises (PROMSXP) 2672 \item new class Rcpp::ExpressionVector to manage expression vectors 2673 (EXPRSXP) 2674 \item new class Rcpp::GenericVector to manage generic vectors, a.k.a 2675 lists (VECSXP) 2676 \item new class Rcpp::IntegerVector to manage integer vectors (INTSXP) 2677 \item new class Rcpp::NumericVector to manage numeric vectors (REALSXP) 2678 \item new class Rcpp::RawVector to manage raw vectors (RAWSXP) 2679 \item new class Rcpp::CharacterVector to manage character vectors (STRSXP) 2680 \item new class Rcpp::Function to manage functions 2681 (CLOSXP, SPECIALSXP, BUILTINSXP) 2682 \item new class Rcpp::Pairlist to manage pair lists (LISTSXP) 2683 \item new class Rcpp::Language to manage calls (LANGSXP) 2684 \item new specializations of wrap to deal with std::initializer lists 2685 only available with GCC >= 4.4 2686 \item new R function Rcpp:::capabilities that can query if various 2687 features are available : exception handling, variadic templates 2688 initializer lists 2689 \item new set of functions wrap(T) converting from T to RObject 2690 \item new template function as<T> that can be used to convert a SEXP 2691 to type T. Many specializations implemented to deal with 2692 C++ builtin and stl types. Factored out of RObject 2693 \item new class Rcpp::Named to deal with named with named objects 2694 in a pairlist, or a call 2695 \item new class Rcpp::Symbol to manage symbols (SYMSXP) 2696 \item The garbage collection has been improved and is now automatic 2697 and hidden. The user needs not to worry about it at all. 2698 \item Rcpp::Environment(SEXP) uses the as.environment R function 2699 \item Doxygen-generated documentation is no longer included as it is both 2700 too large and too volatile. Zipfiles are provided on the website. 2701 } 2702} 2703\section{Changes in Rcpp version 0.7.1 (2010-01-02)}{ 2704 \itemize{ 2705 \item Romain is now a co-author of Rcpp 2706 \item New base class Rcpp::RObject replace RcppSexp (which is provided for 2707 backwards compatibility) 2708 \item RObject has simple wrappers for object creation and conversion to SEXP 2709 \item New classes Rcpp::Evaluator and Rcpp::Environment for expression 2710 evaluation and environment access, respectively 2711 \item New class Rcpp::XPtr for external pointers 2712 \item Enhanced exception handling allows for trapping of exceptions outside 2713 of try/catch blocks 2714 \item Namespace support with a new namespace 'Rcpp' 2715 \item Unit tests for most of the new classes, based on the RUnit package 2716 \item Inline support now provided by the update inline package, so a new 2717 Depends on 'inline (>= 0.3.4)' replaces the code in that was 2718 temporarily in Rcpp 2719 } 2720} 2721\section{Changes in Rcpp version 0.7.0 (2009-12-19)}{ 2722 \itemize{ 2723 \item Inline support via a modified version of 'cfunction' from Oleg 2724 Sklyar's 'inline' package: simple C++ programs can now be compiled, 2725 linked and loaded automagically from the R prompt, including support 2726 for external packages. Also works on Windows (with R-tools installed) 2727 \item New examples for the inline support based on 'Intro to HPC' tutorials 2728 \item New type RcppSexp for simple int, double, std::string scalars and vectors 2729 \item Every class is now in its own header and source file 2730 \item Fix to RcppParams.Rd thanks to Frank S. Thomas 2731 \item RcppVersion.R removed as redundant given DESCRIPTION and read.dcf() 2732 \item Switched to R_PreserveObject and R_ReleaseObject for RcppSexp with 2733 thanks to Romain 2734 \item Licensing changed from LGPL 2.1 (or later) to GPL 2 (or later), file 2735 COPYING updated 2736 } 2737} 2738\section{Changes in Rcpp version 0.6.8 (2009-11-19)}{ 2739 \itemize{ 2740 \item Several classes now split off into their own header and source files 2741 \item New header file RcppCommon.h regrouping common defines and includes 2742 \item Makevars\{,.win\} updated to reflect src/ reorg 2743 } 2744} 2745\section{Changes in Rcpp version 0.6.7 (2009-11-08)}{ 2746 \itemize{ 2747 \item New class RcppList for simple lists and data structures of different 2748 types and dimensions, useful for RProtoBuf project on R-Forge 2749 \item Started to split classes into their own header and source files 2750 \item Added short README file about history and status 2751 \item Small documentation markup fix thanks to Kurt; updated doxygen docs 2752 \item New examples directory functionCallback/ for R function passed to C++ 2753 and being called 2754 } 2755} 2756\section{Changes in Rcpp version 0.6.6 (2009-08-03)}{ 2757 \itemize{ 2758 \item Updated Doxygen documentation 2759 \item RcppParams class gains a new exists() member function 2760 } 2761} 2762\section{Changes in Rcpp version 0.6.5 (2009-04-01)}{ 2763 \itemize{ 2764 \item Small OS X build correction using R_ARCH variable 2765 \item Include LGPL license as file COPYING 2766 } 2767} 2768\section{Changes in Rcpp version 0.6.4 (2009-03-01)}{ 2769 \itemize{ 2770 \item Use std:: namespace throughout instead of 'using namespace std' 2771 \item Define R_NO_REMAP so that R provides Rf_length() etc in lieu of length() 2772 to minimise clashes with other projects having similar functions 2773 \item Include Doxygen documentation, and Doxygen configuration file 2774 \item Minor Windows build fix (with thanks to Uwe and Simon) 2775 } 2776} 2777\section{Changes in Rcpp version 0.6.3 (2009-01-09)}{ 2778 \itemize{ 2779 \item OS X build fix with thanks to Simon 2780 \item Added 'view-only' classes for int and double vector and matrix clases 2781 as well as string vector classses, kindly suggsted / provided by 2782 David Reiss 2783 \item Add two shorter helper functions Rcpp:::CxxFlags() and 2784 Rcpp:::LdFlags() for compilation and linker flags 2785 } 2786} 2787\section{Changes in Rcpp version 0.6.2 (2008-12-02)}{ 2788 \itemize{ 2789 \item Small but important fix for Linux builds in Rcpp:::RcppLdFlags() 2790 } 2791} 2792\section{Changes in Rcpp version 0.6.1 (2008-11-30)}{ 2793 \itemize{ 2794 \item Now src/Makevars replaces src/Makefile, this brings proper OS X 2795 multi-arch support with thanks to Simon 2796 \item Old #ifdef statements related to QuantLib removed; Rcpp is now 2797 decoupled from QuantLib headers yet be used by RQuantLib 2798 \item Added RcppLdPath() to return the lib. directory patch and on Linux 2799 the rpath settings 2800 \item Added new RcppVectorExample() 2801 \item Augmented documentation on usage in Rcpp-package.Rd 2802 } 2803} 2804\section{Changes in Rcpp version 0.6.0 (2008-11-05)}{ 2805 \itemize{ 2806 \item New maintainer, taking over RcppTemplate (which has been without an 2807 update since Nov 2006) under its initial name Rcpp 2808 \item New files src/Makefile\{,.win\} including functionality from both 2809 configure and RcppSrc/Makefile; we now build two libraries, one for 2810 use by the package which also runs the example, and one for users to 2811 link against, and removed src/Makevars.in 2812 \item Files src/Rcpp.\{cpp,h\} moved in from ../RcppSrc 2813 \item Added new class RcppDatetime corresponding to POSIXct in with full 2814 support for microsecond time resolution between R and C++ 2815 \item Several new manual pages added 2816 \item Removed configure\{,.in,.win\} as src/Makefile* can handle this more 2817 easily 2818 \item Minor cleanup and reformatting for DESCRIPTION, Date: now uses 2819 svn:keyword Date property 2820 \item Renamed RcppTemplateVersion to RcppVersion, deleted RcppDemo 2821 \item Directory demo/ removed as vignette("RcppAPI") is easier and more 2822 reliable to show vignette documentation 2823 \item RcppTemplateDemo() removed from R/zzz.R, vignette("RcppAPI") is easier; 2824 man/RcppTemplateDemo.Rd removed as well 2825 \item Some more code reindentation and formatting to R default arguments, 2826 some renamed from RcppTemplate* to Rcpp* 2827 \item Added footnote onto titlepage of inst/doc/RcppAPI.\{Rnw,pdf\} about how 2828 this document has not (yet) been updated along with the channges made 2829 } 2830} 2831