Skip to content

Commit bd8ef3d

Browse files
committed
Tidy up some parts of r.snippets
1 parent 55887f0 commit bd8ef3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: UltiSnips/r.snippets

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ endsnippet
3636

3737
# functions
3838
snippet fun "Function definition"
39-
${1:name} = function (${2:variables}) {
39+
${1:name} <- function (${2:variables}) {
4040
${0}
4141
}
4242
endsnippet
@@ -59,7 +59,7 @@ list(${0:items})
5959
endsnippet
6060

6161
snippet mat "Matrix function"
62-
matrix(${1:data}, nrow=${2:rows}, ncol=${0:cols})
62+
matrix(${1:data}, nrow = ${2:rows}, ncol = ${0:cols})
6363
endsnippet
6464

6565
# apply functions
@@ -88,8 +88,8 @@ tapply(${1:vector}, ${2:index}, ${0:function})
8888
endsnippet
8989

9090
snippet rapply "rapply function"
91-
rapply(${1:list}, ${0:function})
9291
endsnippet
92+
rapply(${1:list}, ${0:function})
9393

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

103103
snippet img "Output an image"
104-
${1:(jpeg,bmp,png,tiff)}(filename="${2:filename}", width=${3}, height=${4}, unit="${5}")
104+
${1:(jpeg,bmp,png,tiff)}(filename = "${2:filename}", width = ${3}, height = ${4}, unit = "${5}")
105105
${0:plot}
106106
dev.off()
107107
endsnippet

0 commit comments

Comments
 (0)