我有一个函数,其中参数之一是通用函数或缺省值或由用户提供。 我想要稍后在猫中显示它。 但是猫结果错误:
Error in cat(what_function, " from ", how_many_files, " files is equal ",, :
argument 1 (type 'closure') cannot be handled by 'cat'
这种转换无效。 函数<-'what_function'
liczZpliku <- function(path, column_name,what_function=mean,how_many_files=1)
result <- what_function(column_name)
cat(what_function, " from ", how_many_files," files is equal ",result, ".\n")
如何将提供的功能更改为可以显示的文本?