0

Profvis works in console but trying to do the same via terminal command profvis requires the code to be inside profvis({ })

Console method that works:

p <- profvis::profvis({source(myscript.R})
print(p) # gives flame/data output htmlwidgets::saveWidget(p, "profile.html") # saved profile.html with flame/data output

Terminal (not successful) -- this runs the script okay but does not save the profiler output. What can I try?

Rscript -e "p <- profvis::profvis({source('myscript.R')}); 
htmlwidgets::saveWidget(p,"profile.html")"

Also tried but it saved what the code does and not the profiler flame/data result

Rscript -e "profvis::profvis({source('myscript.R')})" > profile.html
Rscript -e "profvis::profvis({source('myscript.R')})" > profile.Rprofvis

Expecting to save profiler flame/data output

Sydney_dev
  • 1,448
  • 2
  • 17
  • 24

0 Answers0