Advanced-R-Solutions
Advanced-R-Solutions copied to clipboard
Set of solutions for the Advanced R programming book
quick question, in exercise Q2, section 1.1, why don't i get the same address if I pass the list of mean function as argument of lapply/map? in other words, if...
The exact question [here](https://adv-r.hadley.nz/expressions.html#grammar) is the following: Boilerplate code from the chapter: ``` r library(rlang) expr_type
For example, in [section 20.3 Q6](https://advanced-r-solutions.rbind.io/rewriting-r-code-in-c.html#standard-template-library), the following code creates a version of `union()` in C++: ```cpp #include #include #include using namespace Rcpp; // [[Rcpp::plugins(cpp11)]] // [[Rcpp::export]] IntegerVector unionC(IntegerVector x,...
The `torture = TRUE` flag did also not workout for me, I propose a change as the flag takes actually steps as integer. I also made a pull request on...
The `find()` and `count()` function was linking to the R function definition, it should in this case link to the corresponding C++ unordered set functions. "I assign the copyright of...
The previous text seemed odd to me and more or less double of the same? Changed it slightly, but I'm no english native speaker so I may changed the meaning...
Added a test case to Q1 of 12.2 Controlling access. The test case is to answer the question: `Create a bank account class that prevents you from directly setting the...
Typo `file.download()` should be corrected to `download.file()` "I assign the copyright of this contribution to Malte Grosser and Henning Bumann".
Spliced the example `7.1 Signalling conditions Q2` into two distinct functions one for `message` and one for `cat`. For me it makes it cleaner and easier to understand. "I assign...
Exercises 9.6.3 number 3 is intended to work on lists (which it does), however, we make our checks on an atomic vector instead. Maybe sth like `span_r(mtcars, is.double)` or similar...