Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
| #include <iostream> | |
| #include "borrow_checker.hpp" | |
| int main() | |
| { | |
| auto i = 42; | |
| // borrow `i` under name `ref` | |
| borrow_var(ref, i) |
Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
| stratified <- function(df, group, size, select = NULL, | |
| replace = FALSE, bothSets = FALSE) { | |
| if (is.null(select)) { | |
| df <- df | |
| } else { | |
| if (is.null(names(select))) stop("'select' must be a named list") | |
| if (!all(names(select) %in% names(df))) | |
| stop("Please verify your 'select' argument") | |
| temp <- sapply(names(select), | |
| function(x) df[[x]] %in% select[[x]]) |