Skip to content

Instantly share code, notes, and snippets.

@lbusett
Last active August 3, 2017 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbusett/c323512ea41d187a53278a4cde8fd99a to your computer and use it in GitHub Desktop.
Save lbusett/c323512ea41d187a53278a4cde8fd99a to your computer and use it in GitHub Desktop.
Various "R" tricks
# String manipulation
### Print an integer number with trailing zeroes
number = 1
sprintf("%03i", number)
### use "easier" patterns with wildcards for regexp
glob2rx('*.tif')
# Package checking
### lintr: change limit on lines
with_defaults(line_length_linter(100)) # you love long lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment