研究プロジェクト用に約 30 の関数があり、入力したくありません
source(paste("C:/functions","/function1.txt",sep=""))
C:/functions私の関数のディレクトリはどこで/function1.txt、特定の関数です。
私はもう試した
files <- list.files("C:/functions")
sapply(1:length(files),source(paste("C:/functions/",files[i],sep="")))
そして、それは機能しません。エラーメッセージ: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")
forループでも試しましたが、うまくいきません。