Performance 如何正确使用profr
我想使用profr来分析我的R代码。我对如何使用这个函数感到困惑,因为我找不到任何使用它的例子。有没有一种方法可以在运行R程序时从CMD调用它作为参数?这个程序由许多脚本组成,这增加了混乱。它不是从命令行运行的。它从R内部运行。以下是我所做的Performance 如何正确使用profr,performance,r,profiling,Performance,R,Profiling,我想使用profr来分析我的R代码。我对如何使用这个函数感到困惑,因为我找不到任何使用它的例子。有没有一种方法可以在运行R程序时从CMD调用它作为参数?这个程序由许多脚本组成,这增加了混乱。它不是从命令行运行的。它从R内部运行。以下是我所做的 myTopLevelFunction <- function(){ Rprof(interval = 5) # Start sampling. I want it to sample the stack every 5 seconds # .
myTopLevelFunction <- function(){
Rprof(interval = 5) # Start sampling. I want it to sample the stack every 5 seconds
# ... run the stuff I want to profile
Rprof(NULL) # Stop sampling. Stack samples are in Rprof.out
}
myTopLevelFunction它不是从命令行运行的。它从R内部运行。以下是我所做的
myTopLevelFunction <- function(){
Rprof(interval = 5) # Start sampling. I want it to sample the stack every 5 seconds
# ... run the stuff I want to profile
Rprof(NULL) # Stop sampling. Stack samples are in Rprof.out
}
myTopLevelFunction我想OP想了解profr
软件包@罗曼:哦。呻吟。看,我认为这不是一件有用的事情。我认为OP想了解profr
软件包@罗曼:哦。呻吟。看,我认为这不是一件有用的事情。