autofun: Automatic Generation of R Functions

Description Usage Arguments Details Author(s) See Also

Description

Automatically generate an R funtion using source code contained in an R script.

Usage

1
autofun(fun.name, read.file, write.file)

Arguments

fun.name

Name of the function.

read.file

A connection, or a character string naming the file that contains the R source code that will constitute the body of the function.

write.file

A connection, or a character string naming the file to write the function to.

Details

The idea behind autofun is to use a standalone R script to create an R function. This is done parsing the R script and using the returned expression as the function body.

A function foo returned by autofun gets all the arguments from the working environment. This is done by evaluating the function with eval(foo()). Such a function can return several objects.

Author(s)

Alessandro Samuel-Rosa alessandrosamuelrosa@gmail.com

See Also

base{parse}, utils{capture.output}, base{eval}, base{expression}


samuel-rosa/autofun documentation built on May 29, 2019, 1:03 p.m.