Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GClosure

The GClosure structure


Description

Basically, a GClosure is a transparent-type that represents an R function.

Usage

toRGClosure(c_closure)

Arguments

c_closure

a GClosure

Details

When an API function requests a GClosure as a parameter, the user may pass any R function OR an R object of class GClosure that is returned by certain API functions. A GClosure represents an external object and thus inherits from RGtkObject. The external GClosure objects may be coerced by the function toRGClosure to an R closure. This means that you can effectively invoke external closures (which may be implemented in C or R) in the same way as R functions.

Value

an R closure with an extra ref attribute holding the original external reference

Author(s)

Michael Lawrence


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.