@@ -36,7 +36,7 @@ endsnippet
3636
3737# functions
3838snippet fun " Function definition"
39- ${1: name } = function (${2: variables } ) {
39+ ${1: name } <- function (${2: variables } ) {
4040 ${0}
4141}
4242endsnippet
@@ -59,7 +59,7 @@ list(${0:items})
5959endsnippet
6060
6161snippet mat " Matrix function"
62- matrix(${1: data } , nrow= ${2: rows } , ncol= ${0: cols } )
62+ matrix(${1: data } , nrow = ${2: rows } , ncol = ${0: cols } )
6363endsnippet
6464
6565# apply functions
@@ -88,8 +88,8 @@ tapply(${1:vector}, ${2:index}, ${0:function})
8888endsnippet
8989
9090snippet rapply " rapply function"
91- rapply(${1: list } , ${0: function } )
9291endsnippet
92+ rapply(${1:list}, ${0:function})
9393
9494# plot functions
9595snippet pl " Plot function"
@@ -101,7 +101,7 @@ ggplot(${1:data}, aes(${0:aesthetics}))
101101endsnippet
102102
103103snippet 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 }
106106dev.off()
107107endsnippet
0 commit comments