Skip to content

Commit

Permalink
Tidy up some parts of r.snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavis committed Mar 30, 2014
1 parent 55887f0 commit bd8ef3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions UltiSnips/r.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endsnippet

# functions
snippet fun "Function definition"
${1:name} = function (${2:variables}) {
${1:name} <- function (${2:variables}) {
${0}
}
endsnippet
Expand All @@ -59,7 +59,7 @@ list(${0:items})
endsnippet

snippet mat "Matrix function"
matrix(${1:data}, nrow=${2:rows}, ncol=${0:cols})
matrix(${1:data}, nrow = ${2:rows}, ncol = ${0:cols})
endsnippet

# apply functions
Expand Down Expand Up @@ -88,8 +88,8 @@ tapply(${1:vector}, ${2:index}, ${0:function})
endsnippet

snippet rapply "rapply function"
rapply(${1:list}, ${0:function})
endsnippet
rapply(${1:list}, ${0:function})

# plot functions
snippet pl "Plot function"
Expand All @@ -101,7 +101,7 @@ ggplot(${1:data}, aes(${0:aesthetics}))
endsnippet

snippet img "Output an image"
${1:(jpeg,bmp,png,tiff)}(filename="${2:filename}", width=${3}, height=${4}, unit="${5}")
${1:(jpeg,bmp,png,tiff)}(filename = "${2:filename}", width = ${3}, height = ${4}, unit = "${5}")
${0:plot}
dev.off()
endsnippet
Expand Down

0 comments on commit bd8ef3d

Please sign in to comment.