Change R source code

If you'd like to simply test out the effect of that change in an interactive R session, you can do so using trace(). Here's how:

  1. Type trace("semiMarkov", edit=TRUE)
  2. In the text editor that that launches, edit the line of interest.
  3. Save the modified file.
  4. Close the text editor
  5. Back in R, use the modified function.
原文地址:https://www.cnblogs.com/xiaojikuaipao/p/8358795.html