An open API service indexing awesome lists of open source software.

https://github.com/mrcsparker/rcrawlback

Playtime with R callbacks
https://github.com/mrcsparker/rcrawlback

Last synced: 2 months ago
JSON representation

Playtime with R callbacks

Awesome Lists containing this project

README

        

# crawlback

Playtime with R callbacks

Testing passing Rcpp Functions with C function pointers

```R
do_start <- function() {
print("starting")
}

do_run <- function() {
print("running")
}

do_end <- function() {
print("ending")
}

print("running callbacks")

x <- RCrawlback$new()
x$add_start_callback(do_start)
x$add_run_callback(do_run)
x$add_end_callback(do_end)
x$run()

## Prints:
# [1] "starting"
# [1] "running"
# [1] "ending"

```