My First R Package!


meandr allows for easy generation of coordinates that are random, yet continuously differentiable. This is particularly useful for simulating time-series measurements of physical phenomena that maintain a clear local trajectory.

Essentially, meandr provides an alternative to rnorm for noise generation.

Quick Example

You can call meandr() without any arguments! Each call returns a tibble of coordinates.

library(meandr)

df <- meandr()

df
## # A tibble: 100 x 2
##         t       f
##     <dbl>   <dbl>
##  1 0.01   -0.0128
##  2 0.02   -0.0513
##  3 0.03   -0.0897
##  4 0.04   -0.128 
##  5 0.05   -0.167 
##  6 0.06   -0.179 
##  7 0.0700 -0.192 
##  8 0.08   -0.205 
##  9 0.09   -0.192 
## 10 0.10   -0.179 
## # ... with 90 more rows

For more details, click here!

I also wrote a detailed case study about the problem that originally inspired me to create this package.

Reflections

Altogether, this experience has given me an immense appreciation for how much work goes into package creation. If you’ve never created a package before, I highly suggest two resources:

  • R Packages by Hadley Wickham and Jenny Bryan. This book champions the usethis package, which is a must.
  • Additionally, you might also check out Chapter 7 from Hadley’s Advanced R. This provides thorough explanation of R Namespaces - having a deep understanding of this material will make package creation must less daunting.

Finally, I should give credit to Dave Robinson’s talk, “The Unreasonable Effectiveness of Public Work”. Listening to this talk was one of the most inspirational experiences of my professional life.

No matter where you are in your Data Science journey, sharing your work is one of the most meaningful things you can do for the world.