@@ -36,7 +36,7 @@ endsnippet
36
36
37
37
# functions
38
38
snippet fun " Function definition"
39
- ${1: name } = function (${2: variables } ) {
39
+ ${1: name } <- function (${2: variables } ) {
40
40
${0}
41
41
}
42
42
endsnippet
@@ -59,7 +59,7 @@ list(${0:items})
59
59
endsnippet
60
60
61
61
snippet mat " Matrix function"
62
- matrix(${1: data } , nrow= ${2: rows } , ncol= ${0: cols } )
62
+ matrix(${1: data } , nrow = ${2: rows } , ncol = ${0: cols } )
63
63
endsnippet
64
64
65
65
# apply functions
@@ -88,8 +88,8 @@ tapply(${1:vector}, ${2:index}, ${0:function})
88
88
endsnippet
89
89
90
90
snippet rapply " rapply function"
91
- rapply(${1: list } , ${0: function } )
92
91
endsnippet
92
+ rapply(${1:list}, ${0:function})
93
93
94
94
# plot functions
95
95
snippet pl " Plot function"
@@ -101,7 +101,7 @@ ggplot(${1:data}, aes(${0:aesthetics}))
101
101
endsnippet
102
102
103
103
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} ")
105
105
${0: plot }
106
106
dev.off()
107
107
endsnippet
0 commit comments