This blog post has two goals Investigate the {bench} package for timing R functions Consequently explore the different algorithms in the {digest} package using {bench} What is {digest}? The {digest} package provides a hash function to summarise R objects. Standard hashes are available, such as md5, crc32, sha-1, and sha-256. The key function in the package is digest() that applies a cryptographical hash function to arbitrary R objects. By default, the objects are internally serialized using md5.
timing
Published: November 6, 2017
As time goes on, your R scripts are probably getting longer and more complicated, right? Timing parts of your script could save you precious time when re-running code over and over again. Today I’m going to go through the 4 main functions for doing so. Nested timings 1) Sys.time() Sys.time() takes a “snap-shot” of the current time and so it can be used to record start and end times of code.
Recent Posts
- How to customise the style of your {shinydashboard} Shiny app
- Network Error Logging - Important Insights
- SatRdays London 2023: Speakers
- Content Security Policy - Why You Need It
- Why should I use R: The Excel R Data Wrangling comparison: Part 1
- Shiny in Production 2023: Workshops
- Work smarter; not harder: COVID-19 processing for the WHO/Europe
- Should I learn Stan?
- February Training Update
- Quarto for the Python user