Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance 如何正确使用profr_Performance_R_Profiling - Fatal编程技术网

Performance 如何正确使用profr

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 # .

我想使用profr来分析我的R代码。我对如何使用这个函数感到困惑,因为我找不到任何使用它的例子。有没有一种方法可以在运行R程序时从CMD调用它作为参数?这个程序由许多脚本组成,这增加了混乱。

它不是从命令行运行的。它从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它不是从命令行运行的。它从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
软件包@罗曼:哦。呻吟。看,我认为这不是一件有用的事情。