Last active
July 12, 2016 13:04
-
-
Save zkamvar/e0260aedb00e46a2952a to your computer and use it in GitHub Desktop.
Custom snippets that I use for Rstudio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test that skeleton | |
snippet tt | |
test_that("${1:stuffworks}", { | |
${2:skip_on_cran()} | |
}) | |
# add a header line | |
snippet hl | |
#==============================================================================# | |
${0} | |
# skelton for internal documentation | |
snippet idoc | |
#==============================================================================# | |
# ${1:Description of internal function} | |
# | |
# Public functions utilizing this function: | |
# ## ${2:funk} | |
# | |
# Internal functions utilizing this function: | |
# ## ${3:ifunk} | |
#==============================================================================# | |
# skeleton for Rd code link | |
snippet clink | |
\code{\link{${0}}} | |
# My preference for setMethod | |
snippet sm | |
setMethod( | |
f = "${1:generic}", | |
signature(${2:varname} = "${3:class}"), | |
definition = function(${2:x, ...}) { | |
${0} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment