after v1.0.0

0

Monthly downloads

0th

Percentile

by Gabor Csardi

Run Code in the Background

Run an R function in the background, possibly after a delay. The current version uses the Tcl event loop and was ported from the 'tcltk2' package.

Readme

after

Run Code in the Background

Linux Build Status Windows Build status CRAN RStudio mirror downloads Coverage Status

Run an R function in the background, possibly after a delay. The current version uses the Tcl event loop and was ported from the 'tcltk2' package.

Installation

source("https://install-github.me/gaborcsardi/after")

Usage

library(after)

Run a function five seconds later:

after(5000, function() cat("Here I am!\n"))

Call a function in a package. It is good practice to create an anonymous function for this:

after(5000, function() utils::alarm())

Run a function every three seconds:

id <- after(3000, function() cat("Still here!\n"), redo = Inf)
Sys.sleep(10)
Still here!
Still here!
Still here!

Cancel it:

after$cancel(id)

License

LGPL-3 © Gábor Csárdi

Functions in after

Name Description
after Run Code in the Background
No Results!

Last month downloads

Details

License LGPL-3
LazyData true
URL https://github.com/gaborcsardi/after
BugReports https://github.com/gaborcsardi/after/issues
RoxygenNote 5.0.1
Encoding UTF-8
NeedsCompilation no
Packaged 2016-07-09 16:03:44 UTC; gaborcsardi
Repository CRAN
Date/Publication 2016-07-10 11:55:48
suggests covr , testthat
imports tcltk
Contributors Gabor Csardi

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/after)](http://www.rdocumentation.org/packages/after)