Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: logging capabilities #8

Open
statzhero opened this issue May 9, 2021 · 0 comments
Open

Feature request: logging capabilities #8

statzhero opened this issue May 9, 2021 · 0 comments

Comments

@statzhero
Copy link
Contributor

Running the makefile (or any other pipeline tool), from what I can tell, produces only minimal feedback. Personally, I find log output critical for reproducibility as well as to make sure things run as expected. A few suggestions:

  1. Include, as an easy fix, the excellent tidylog package to the template. It masks dplyr and tidyr operations and is in my opinion the single most powerful way to avoid merge mistakes etc.
  2. Add a "logging" functionality. I'm not aware of a base R solution to this desideratum [1] that would be comparable to Stata's log file system. There are dedicated packages (e.g. logger) but I haven't tried them.
  3. Add more custom notifications? Via base::message or utils::txtProgressBar but it may not be general enough.

I look forward to hearing better ideas!

[1] One can have a weak version of it like this:

# Start logging
TODAY <- as.Date(Sys.time(), tz = "US")
logs <- file( paste0("outputs/import-log-", TODAY, ".txt") )
sink(logs, append = TRUE, split = TRUE)
sink(logs, append = TRUE, type = "message")

...

# Stop logging
sink() 
sink(type="message")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant