I have about 30 functions for a research project and don't want to print
source(paste("C:/functions","/function1.txt",sep=""))
30 times, where C:/functions is my function directory, and /function1.txt is a special function.
I tried
files <- list.files("C:/functions") sapply(1:length(files),source(paste("C:/functions/",files[i],sep="")))
And it does not work. Error message: Error in match.fun(FUN) : c("'source(paste(\"C:/functions/\", ' is not a function, character or symbol", "' files[i], sep = \"\"), TRUE)' is not a function, character or symbol")
I also tried it with a for loop and it does not work.
user1125946
source share