Last active
January 25, 2017 10:04
-
-
Save stepf/6068877 to your computer and use it in GitHub Desktop.
Basic R code completions list for Sublime Text, copy to `~/Library/Application Support/Sublime Text 3/Packages/User` to install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
/* | |
R completions list for Sublime Text | |
last update: 24 Jul 2013 | |
Taken from the R Reference Card | |
by Bent Jørgensen, | |
adapted from the R/Rpad Reference Card by Tom Short. | |
Granted to the public domain. 2011-01-12 | |
http://statmaster.sdu.dk/bent/courses/ST501-2011/Rcard.pdf | |
*/ | |
{ | |
"scope": "source.r", | |
"completions": | |
[ | |
// 01 Getting started | |
"q('yes')", | |
"q('no')", | |
"TRUE", | |
"FALSE", | |
"Inf", | |
"NA", | |
// 02 Help functions, workspace and packages | |
"help.start", | |
"help", | |
"help.search", | |
"demo", | |
"example", | |
"str", | |
"summary", | |
"dir", | |
"setwd", | |
"setwd(dirname(parent.frame(2)$ofile))" | |
"getwd", | |
"ls", | |
"rm", | |
"options", | |
"methods", | |
"search", | |
"library", | |
"apropos", | |
"find", | |
"install.packages", | |
"update.packages", | |
// 03 Input and output | |
"file", | |
"save.image", | |
"load", | |
"data", | |
"source", | |
"sink", | |
"scan", | |
"read.table", | |
"read.csv", | |
"read.delim", | |
"read.fwf", | |
"save", | |
"print", | |
"format", | |
"cat", | |
"write.table", | |
"clipboard", | |
"foreign", | |
"read.dta", | |
// 04 Simple patterned vectors | |
"<- ", | |
"c", | |
"seq", | |
"rep", | |
"list", | |
"factor", | |
"gl", | |
"expand.grid", | |
// 05 Arithmetic operations | |
"trunc", | |
"ceiling", | |
"round", | |
// 06 Math functions | |
"sin", | |
"cos", | |
"tan", | |
"asin", | |
"acos", | |
"atanatan2", | |
"log", | |
"log10", | |
"log2", | |
"exp", | |
"sqrt", | |
"sinh", | |
"cosh", | |
"tanh", | |
"asinh", | |
"acosh", | |
"atanh", | |
"pi", | |
"abs", | |
"sign", | |
"log", | |
"log1p", | |
"expm1", | |
"beta", | |
"lbeta", | |
"gammalgamma", | |
"digamma", | |
"trigamma", | |
"psigamma", | |
"factorial", | |
"lfactorial", | |
"choose", | |
"lchoose", | |
"na.rm = F", | |
// 07 Logical operators | |
"logical", | |
"any", | |
"all", | |
// 08 Complex numbers | |
"complex", | |
"Re", | |
"lm", | |
"Mod", | |
"Arg", | |
"Conj", | |
// 09 Matrices and arrays | |
"matrix", | |
"rbind", | |
"cbind", | |
"tdet", | |
"trace", | |
"norm", | |
"as.matrix", | |
"kappa", | |
"diag", | |
"solve", | |
"forwardsolve", | |
"backwardsolve", | |
"qr.solve", | |
"qr.solvechol", | |
"chol12inv", | |
"eigen", | |
"svd", | |
"crossprod", | |
"outer", | |
"kronecker", | |
"lower.tri", | |
"upper.tri", | |
"rowSums", | |
"rowMeans", | |
"colSums", | |
"colMeans", | |
"rowsum", | |
"colsum", | |
"array", | |
"dim", | |
// 10 Strings | |
"character", | |
"nchar", | |
"paste", | |
"paste0", | |
"substring", | |
"strsplit", | |
"grep", | |
"gsub", | |
"tolower", | |
"toupper", | |
"match", | |
"pmatch", | |
// 11 Data frames and time series | |
"data.frame", | |
"transform", | |
"with", | |
"attach", | |
"detach", | |
"terms", | |
// 12 Elemens and subsets of vectors and matrices | |
// 13 Descriptive statistics | |
"maxmin", | |
"range", | |
"IQR", | |
"fivenum", | |
"sum", | |
"diff", | |
"prod", | |
"mean", | |
"median", | |
"quantile", | |
"weighted.mean", | |
"rank", | |
"var", | |
"sd", | |
"cor", | |
"scale", | |
"pmin", | |
"pmax", | |
"cumsum", | |
"cumprod", | |
"cummin", | |
"cummax", | |
"union", | |
"intersect", | |
"setdiff", | |
"setequal", | |
"is.element", | |
// 14 Distribution and simulation | |
"rnormrexp", | |
"rgamma", | |
"rbinom", | |
"rpois", | |
"rgeom", | |
"rhyper", | |
"rweibull", | |
"rcauchy", | |
"rbeta", | |
"rtrchisq", | |
"rlogis", | |
"rlnorm", | |
"rnbinom", | |
"runif", | |
"rwilcox", | |
// 15 Tests and ANOVA | |
"aov", | |
"anova", | |
"density", | |
"binom.test", | |
"pairwise.t.test", | |
"power.t.test", | |
"t.test", | |
"cor.test", | |
"wilcox.test", | |
// 16 Regression and model fitting | |
"glm", | |
"nls", | |
"approx", | |
"spline", | |
"lowess", | |
"summary", | |
"predict", | |
"df.residual", | |
"coef", | |
"residuals", | |
"deviance", | |
"fitted", | |
"summary(fit)$sigma" | |
"logLik", | |
"AIC", | |
// 17 Statistical packages | |
// 18 Simple plotting commands | |
"plot", | |
"curve", | |
"hist", | |
"stem", | |
"barplot", | |
"dotchart", | |
"piechartboxplot", | |
"sunflowerplot", | |
"stripplot", | |
"coplot", | |
"interaction.plot", | |
"matplot", | |
"fourfoldplot", | |
"assocplot", | |
"mosaicplot", | |
"pairs", | |
"plot.ts", | |
"ts.plot", | |
"qqnorm", | |
"qqplot", | |
"qqline", | |
"contour", | |
"filled.contour", | |
"image", | |
"persp", | |
"stars", | |
"symbols", | |
"termplot", | |
"add", | |
"axes", | |
"type", | |
"xlim", | |
"ylim", | |
"xlab", | |
"ylab", | |
"main", | |
"sub", | |
"plotmath", | |
// 19 Low-level plotting commands | |
"points", | |
"lines", | |
"text", | |
"mtext", | |
"segments", | |
"arrows", | |
"abline", | |
"abline(a = 0, b = 1) # 45° rising", | |
"abline(h = ) # horizontal", | |
"abline(v = ) # vertical", | |
"rect", | |
"polygon", | |
"legend", | |
"title", | |
"axis", | |
"boxrug", | |
"locator", | |
// 20 Graphics devices | |
"windows", | |
"x11", | |
"quartz", | |
"postscript", | |
"ps.options", | |
"bitmap", | |
"bmp", | |
"jpeg", | |
"pdf", | |
"pictex", | |
"png", | |
"tiff", | |
"xfig", | |
"dev.off", | |
// 21 Graphical parameters | |
"adj", | |
"bg", | |
"bty", | |
"cex", | |
"cex.axis", | |
"cex.lab", | |
"cex.main", | |
"cex.sub", | |
"col", | |
"font", | |
"font.axis", | |
"font.lab", | |
"font.main", | |
"font.sub", | |
"las", | |
"lty", | |
"lwd", | |
"mar", | |
"mfcol", | |
"mfrow", | |
"pch", | |
"ps", | |
"pty", | |
"tck", | |
"tcl", | |
"xaxs", | |
"yaxs", | |
"xaxt", | |
"yaxt", | |
// 22 Lattice (Trellis graphics) | |
// 23 Variable conversion | |
"as.array", | |
"as.call", | |
"as.character", | |
"as.complex", | |
"as.data.frame", | |
"as.double", | |
"as.expression", | |
"as.factor", | |
"as.integer", | |
"as.list", | |
"as.logical", | |
"as.matrix", | |
"as.na", | |
"as.name", | |
"as.null", | |
"as.numeric", | |
"as.ordered", | |
"as.qr", | |
"as.real", | |
"as.ts", | |
"as.vector", | |
// 24 Variable information | |
"is.array", | |
"is.atomic", | |
"is.call", | |
"is.character", | |
"is.complex", | |
"is.data.frame", | |
"is.double", | |
"is.environment", | |
"is.expression", | |
"is.factor", | |
"is.finite", | |
"is.function", | |
"is.integer", | |
"is.language", | |
"is.list", | |
"is.loaded", | |
"is.logical", | |
"is.matrix", | |
"is.na", | |
"is.nan", | |
"is.name", | |
"is.null", | |
"is.numeric", | |
"is.ordered", | |
"is.qr", | |
"is.real", | |
"is.recursive", | |
"is.single", | |
"is.ts", | |
"is.unordered", | |
"is.vector", | |
"length", | |
"dim", | |
"dimnames", | |
"nrow", | |
"ncol", | |
"class", | |
"unclass", | |
"attr", | |
"attributes", | |
// 25 Data selection and manipulation | |
"which.max", | |
"which.min", | |
"rev", | |
"sort", | |
"cut", | |
"match", | |
"which", | |
"na.omit", | |
"na.fail", | |
"unique", | |
"table", | |
"subset", | |
"sample", | |
"prop.table", | |
// 26 Advanced data processing | |
"replicate", | |
"apply", | |
"lapply", | |
"tapply", | |
"by", | |
"ave", | |
"merge", | |
"xtabs", | |
"aggregate", | |
"stack", | |
"unstack", | |
"reshape", | |
"convolve", | |
"fft", | |
"mvfft", | |
"filter", | |
// 27 Dates and times | |
"as.Date", | |
// 28 Programming | |
// Code snippets are probably a more adequate solution for functions and loops than | |
"return", | |
"fix", | |
"repeat", | |
"break", | |
"next", | |
"stopifnot", | |
"browser", | |
"debug", | |
"traceback", | |
"do.call", | |
"system", | |
"Rprof", | |
"system.time", | |
// 29 Optimiziation and linear programming | |
"optimize", | |
"optim", | |
"nlm" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment