Other than through redirection, which captures an entire session, is there a way to start and stop logging during an R session? To clarify, I am looking for something similar to the log using
command in Stata.
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- how do I log requests and responses for debugging
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
For the sake of completing the answer using sink
Do you know about
sink()
in base R ?There are also some logging packages on CRAN: logging, log4r and possibly more.
Lastly, Emacs user have ESS and its transcript mode. You can save your session as a log, and in general, the 'work from file and execute from the file' approach builds a (partial, commands-only) log as you work.
There's
savehistory(file)
which will write the entire history as plaintext, or, if you're trying to log output, usesink(file, split = TRUE)
.In addition to the
sink
function you might also look at thetxtStart
and related functions in theTeachingDemos
package or the similar functionality in theR2HTML
package (which came first).