Re: [R] Definition of "wrapper"?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sun, 30 Mar 2008 15:35:05 -0400

The wrapper wraps, i.e. calls, another function that does the real work but provides a different or more convenient (or more convenient for a specific purpose) interface to it or specific syntax. Often the wrapper has the same arguments but different defaults and sometimes that is referred to as a "convenience" wrapper. Sometimes its used in the sense of providing an R interface to a C function with essentially similar arguments.

by is a wrapper to tapply which preprocesses the data in a way that makes it acceptable to tapply, read.csv and Map are wrappers to read.table and mapply which are the same but have different argument defaults, sprintf is a wrapper to the C function of the same name, %o% is a wrapper to outer.

I don't think there is a formalized definition within R -- the above is based on current usage.

On Sun, Mar 30, 2008 at 2:51 PM, Bryan Hanson <hanson_at_depauw.edu> wrote:
> I think I more or less understand what a łwrapper˛ is, but Iąd like to hear
> how more experienced R users define it, and especially I'd like to know if
> there is a formal definition. In my reading, it seems like there are a
> fairly wide range of meanings, but they are all conceptually similar.
>
> I've looked in a couple of the classic R texts, the extensions and
> developers' manuals, and R help archives, and didn't find a definition. Of
> course, I may have missed it.
>
> Thanks in advance. Bryan
>
> **************
> Bryan Hanson
> Professor of Chemistry & Biochemistry
> DePauw University
> 602 S. College Avenue
> Greencastle, IN 46135
> PHONE 765-658-4602
> FAX 765-658-6084
> hanson_at_depauw.edu
> http://academic.depauw.edu/~hanson/deadpezsociety.html
> http://www.depauw.edu/acad/chemistry/
> http://academic.depauw.edu/~hanson/UMP/index.html
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 30 Mar 2008 - 19:39:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 30 Mar 2008 - 21:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive