|
41 | 41 | 'Function':
|
42 | 42 | 'prefix': 'fun'
|
43 | 43 | 'body': 'function(${1:x}) ${3:{$0\\}}'
|
| 44 | + 'Generalized Linear Models': |
| 45 | + 'prefix': 'glm' |
| 46 | + 'body': 'glm(${1:formula}, ${2:family = {3:gaussian}}, ${4:data})' |
| 47 | + 'Grep': |
| 48 | + 'prefix': 'grep' |
| 49 | + 'body': 'grep(${1:pattern}, ${2:x}, ${3:ignore.case = ${4:FALSE}}, ${5:perl = ${6:FALSE}})' |
| 50 | + 'Grep': |
| 51 | + 'prefix': 'grep' |
| 52 | + 'body': 'grep(${1:pattern}, ${2:x}, ${3:ignore.case = ${4:FALSE}}, ${5:perl = ${6:FALSE}}, ${7:value = ${8:FALSE}}, ${9:fixed = ${10:TRUE}})' |
| 53 | + 'Grep logical': |
| 54 | + 'prefix': 'grepl' |
| 55 | + 'body': 'grep(${1:pattern}, ${2:x}, ${3:ignore.case = ${4:FALSE}}, ${5:perl = ${6:FALSE}}, ${7:fixed = ${8:TRUE}})' |
44 | 56 | 'Ifelse':
|
45 | 57 | 'prefix': 'ife'
|
46 | 58 | 'body': 'ifelse(${1:test}, ${2:yes}, ${3:no})'
|
47 | 59 | 'Install package':
|
48 | 60 | 'prefix': 'ins'
|
49 | 61 | 'body': 'install.packages(${1:pkgs}, ${2:lib}, ${3:repos = ${4:getOption("repos")}}, ${5:contriburl = ${6:contrib.url(repos, type)}})'
|
| 62 | + 'Kmeans': |
| 63 | + 'prefix': 'km' |
| 64 | + 'body': 'kmeans(${1:x}, ${2:centers}, ${3:iter.max = ${4:10}}, ${5:nstart = ${6:1}}, ${7:algorithm = ${8:c("Hartigan-Wong", "Lloyd", "Forgy","MacQueen")}}, ${9:trace = ${10:FALSE}})' |
| 65 | + 'Kruskal-Wallis Rank Sum test': |
| 66 | + 'prefix': 'kr' |
| 67 | + 'body': 'kruskal.test(${1:formula}, ${2:data}, ${3:subset}, ${4:na.action}, ${5:\...})' |
50 | 68 | 'Lapply':
|
51 | 69 | 'prefix': 'lap'
|
52 | 70 | 'body': 'lapply(${1:X}, ${2:FUN}, ${3:\...})'
|
|
62 | 80 | 'Load RData':
|
63 | 81 | 'prefix': 'loa'
|
64 | 82 | 'body': 'load(${1:file}, ${2:envir = ${3:parent.frame()}}, ${4:verbose = ${5:FALSE}})'
|
| 83 | + 'Linear regression': |
| 84 | + 'prefix': 'lm' |
| 85 | + 'body': 'lm(${1:formula}, ${2:data}, ${3:subset}, ${4:weights}, ${5:na.action})' |
65 | 86 | 'Matrix':
|
66 | 87 | 'prefix': 'mat'
|
67 | 88 | 'body': 'matrix(${1:data = ${2:NA}}, ${3:nrow = ${4:1}}, ${5:ncol = ${6:1}}, ${7:byrow = ${8:FALSE}}, ${9:dimnames = ${10:NULL}})'
|
68 | 89 | 'Mean':
|
69 | 90 | 'prefix': 'mea'
|
70 | 91 | 'body': 'mean(${1:x}${2:, na.rm=${3:FALSE}})'
|
| 92 | + 'Merge': |
| 93 | + 'prefix': 'mer' |
| 94 | + 'body': 'merge(${1:x}, ${2:y}, ${3:by = ${4:intersect(names(x), names(y))}}, ${5:all = ${6:FALSE}})' |
| 95 | + 'Names': |
| 96 | + 'prefix': 'nam' |
| 97 | + 'body': 'names(${1:x})' |
| 98 | + 'Options': |
| 99 | + 'prefix': 'opt' |
| 100 | + 'body': 'options(${1:\...})' |
| 101 | + 'Order': |
| 102 | + 'prefix': 'ord' |
| 103 | + 'body': 'order(${1:\...}, ${2:na.last = ${3:TRUE}}, ${4:decreasing = ${5:FALSE}})' |
| 104 | + 'Outer': |
| 105 | + 'prefix': 'out' |
| 106 | + 'body': 'outer(${1:X}, ${2:Y}, ${3:FUN = ${4:"*"}}, ${5:\...})' |
71 | 107 | 'Paste':
|
72 | 108 | 'prefix': 'pas'
|
73 | 109 | 'body': 'paste(${1:\...}, ${2:sep = ${3:" "}}, ${3:collapse = ${4:NULL}})'
|
74 | 110 | 'Paste0':
|
75 | 111 | 'prefix': 'pas0'
|
76 | 112 | 'body': 'paste(${1:\...}, ${2:collapse = ${3:NULL}})'
|
| 113 | + 'Plot': |
| 114 | + 'prefix': 'print' |
| 115 | + 'body': 'plot(${1:x}, ${2:y}, ${3:\...})' |
| 116 | + 'Points': |
| 117 | + 'prefix': 'poi' |
| 118 | + 'body': 'points(${1:x}, ${2:y = ${3:NULL}}, ${4:type = ${5:"p"}}, ${6:\...})' |
77 | 119 | 'Polygonal Line':
|
78 | 120 | 'prefix': 'lin'
|
79 | 121 | 'body': 'lines(${1:x}${2:, color=${3:red}})'
|
| 122 | + 'Print': |
| 123 | + 'prefix': 'pri' |
| 124 | + 'body': 'print(${1:x}, ${2:\...})' |
| 125 | + 'Quantile': |
| 126 | + 'prefix': 'qua' |
| 127 | + 'body': 'quantile(${1:x}, ${2:probs = ${3:seq(0, 1, 0.25)}}, ${4:na.rm = ${5:FALSE}}, ${6:names = ${7:TRUE}}, ${8:type = ${9:7}}, ${10:\...})' |
80 | 128 | 'Read From csv':
|
81 | 129 | 'prefix': 'reac'
|
82 | 130 | 'body': 'read.csv("${1:filename}"${2:, header = ${3:TRUE}, sep = "${4:\\,}", stringsAsFactors = ${5:FALSE}})'
|
83 | 131 | 'Read From File':
|
84 | 132 | 'prefix': 'reat'
|
85 | 133 | 'body': 'read.table("${1:filename}"${2:, header = ${3:TRUE}, sep = "${4:\\t}", stringsAsFactors = ${5:FALSE}})'
|
| 134 | + 'Rep': |
| 135 | + 'prefix': 'rep' |
| 136 | + 'body': 'rep(${1:x}, ${2:\...})' |
| 137 | + 'Sample': |
| 138 | + 'prefix': 'sam' |
| 139 | + 'body': 'sample(${1:x}, ${2:size}, ${3:replace = ${4:FALSE}}, ${5:prob = ${6:NULL}})' |
86 | 140 | 'Sequence (from,to,by)':
|
87 | 141 | 'prefix': 'seq'
|
88 | 142 | 'body': 'seq(${1:from}, ${2:to}, ${3:by})'
|
|
95 | 149 | 'Standard deviation':
|
96 | 150 | 'prefix': 'sd'
|
97 | 151 | 'body': 'sd(${1:x}${2:, na.rm=${3:FALSE}})'
|
| 152 | + 'Table': |
| 153 | + 'prefix': 'tab' |
| 154 | + 'body': 'table(${1:\...})' |
| 155 | + 'Tapply': |
| 156 | + 'prefix': 'tap' |
| 157 | + 'body': 'tapply(${1:X}, ${2:INDEX}, ${3:FUN = ${4:NULL}}, ${5:\...}, ${6:simplify = ${7:TRUE}})' |
| 158 | + 'Unique': |
| 159 | + 'prefix': 'uni' |
| 160 | + 'body': 'unique(${1:x}, ${2:incomparables = ${3:FALSE}}, ${4:\...})' |
| 161 | + 'Which': |
| 162 | + 'prefix': 'whi' |
| 163 | + 'body': 'which(${1:x}, ${2:arr.ind = ${3:FALSE}}, ${4:useNames = ${5:TRUE}})' |
| 164 | + 'Write csv': |
| 165 | + 'prefix': 'wric' |
| 166 | + 'body': 'write.csv(${1:x}, ${2:file = ${3:""}}, ${4:append = ${5:FALSE}}, ${6:quote = ${7:TRUE}}, ${8:sep = ${9:" "}}' |
98 | 167 | 'File.choose':
|
99 | 168 | 'prefix': 'fch'
|
100 | 169 | 'body': '${1:file = }file.choose()${0:}'
|
|
0 commit comments