Ankur Chakravarthy
Ankur Chakravarthy

Reputation: 408

Exporting all functions in a workspace to an R source file

Is there a way to write all the functions I have in an R workspace to an R file that I can put in a package?

Best wishes, Ankur.

Upvotes: 1

Views: 347

Answers (1)

Victorp
Victorp

Reputation: 13856

Try this with lsf.str (found in the post of the comment from @hrbrmstr) :

dump(list = lsf.str(), file = "functions.R")

It write all your function in an R script.

And you can source these functions with :

source("functions.R")

Upvotes: 4

Related Questions