1

I have a huge R project with 30+ functions and 30+ fixed values. Is there a smart way of exporting those functions into a list? I want to the entire function to be seen not just the syntax. The same goes for the values.

Best regards H

2 Answers 2

1

If you want only a list of function and variable names, you just run ls():

# some stuff a_fun <- function(x = 0) {return(x)} b_var <- 1:5 # get only a vector of the names of your stuff ls() #> [1] "a_fun" "b_var" 

If you want also to see the values and source codes of the functions, add mget():

# some stuff... a_fun <- function(x = 0) {return(x)} b_var <- 1:5 # get all the stuff as a list mget(ls()) #> $a_fun #> function(x = 0) {return(x)} #> #> $b_var #> [1] 1 2 3 4 5 
Sign up to request clarification or add additional context in comments.

Comments

1

I used mget(lsf.str()), which solved my problem. Thanks

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.