writeFunction: Function output

Description Usage Arguments Author(s) Examples

Description

Prints a function to a file.

Usage

1

Arguments

fun

A function.

file

A character string naming a file. By default, write the function in <fun>.R in the working directory.

Author(s)

Mathieu Basille basille@ufl.edu

Examples

1
2
3
4
5
6
7
8
9
f1 <- function(x) {
    ## Comment
    print(x)
}
writeFunction(f1)
rm(f1)
source("f1.R")
file.remove("f1.R")
f1(3)

basille/basr documentation built on May 11, 2019, 8:32 p.m.