library(remoji)
library(wakatimer)
# wakatime api key and app id set to R global environment Sys.setenv("WAKATIME_KEY" = "<your api key>") Sys.setenv("WAKATIME_ID" = "<application id>") Sys.setenv("WAKATIME_SECRET" = "<application secret>") # also add to .RProfile
key = Sys.getenv("WAKATIME_KEY") app.id = Sys.getenv("WAKATIME_ID") app.secret = Sys.getenv("WAKATIME_SECRET")
# Continue to authorize write_scope()
The wakatimer begin to record your code as heartbeats!
r emoji("computer")
R (3.2.3) r emoji("large_blue_circle")
RStudio (0.99.868) r emoji("package")
wakatimer (0.1.1)
That's all! Use like you normally do and your time will record by log.
# Normally terminate r session # Data POST to WakaTime as heartbeats # wait for a moment... q()
The {wakatimer}
provide current sessions modificate file information will sent to WakaTime!! Visit https://wakatime.com to see your logged time. However, when in such situation out of scope for post to wakatime API 1) Force Quit RStudio 2) Restart R.
When unconnect to internet, heartbeats save to local database.
wakatimer:::wt_api(resource = "heartbeats", key = Sys.getenv("WAKATIME_KEY"), param = list(date = format(Sys.Date(), "%m/%d/%Y"), time = "time", "entity"))
{wakatimer}
is automatically log and post information that files in project directory when internet connection. Here, I indicate that to sent indivual heartbeat method.
devtools::session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.