转载请注明出处:http://www.cnblogs.com/lizichao/p/4800513.html

词汇表

  想要玩得转R,重要的一点是有一个好的工作词汇表。以下是我认为的一个好的词汇表。你不必熟悉每个函数的细节,但是你应该知道它们的存在。如果词汇表中的函数你没有听说过,我强烈建议你阅读下相关文档。

  我阅读了base包、stats包、untils包所有的函数,并提取了我认为最重要的函数,组成了下列的词汇表。列表中也有一些其他包中的重要函数,而且还有一些更加重要的,比如options()。

基本函数

# The first functions to learn
?
str # Important operators and assignment
%in%, match
=, <-, <<-
$, [, [[, head, tail, subset
with
assign, get # Comparison
all.equal, identical
!=, ==, >, >=, <, <=
is.na, complete.cases
is.finite # Basic math
*, +, -, /, ^, %%, %/%
abs, sign
acos, asin, atan, atan2
sin, cos, tan
ceiling, floor, round, trunc, signif
exp, log, log10, log2, sqrt max, min, prod, sum
cummax, cummin, cumprod, cumsum, diff
pmax, pmin
range
mean, median, cor, sd, var
rle # Functions to do with functions
function
missing
on.exit
return, invisible # Logical & sets
&, |, !, xor
all, any
intersect, union, setdiff, setequal
which # Vectors and matrices
c, matrix
# automatic coercion rules character > numeric > logical
length, dim, ncol, nrow
cbind, rbind
names, colnames, rownames
t
diag
sweep
as.matrix, data.matrix # Making vectors
c
rep, rep_len
seq, seq_len, seq_along
rev
sample
choose, factorial, combn
(is/as).(character/numeric/logical/...) # Lists & data.frames
list, unlist
data.frame, as.data.frame
split
expand.grid # Control flow
if, &&, || (short circuiting)
for, while
next, break
switch
ifelse # Apply & friends
lapply, sapply, vapply
apply
tapply
replicate

常见数据结构相关函数

# Date time
ISOdate, ISOdatetime, strftime, strptime, date
difftime
julian, months, quarters, weekdays
library(lubridate) # Character manipulation
grep, agrep
gsub
strsplit
chartr
nchar
tolower, toupper
substr
paste
library(stringr) # Factors
factor, levels, nlevels
reorder, relevel
cut, findInterval
interaction
options(stringsAsFactors = FALSE) # Array manipulation
array
dim
dimnames
aperm
library(abind)

统计函数

# Ordering and tabulating
duplicated, unique
merge
order, rank, quantile
sort
table, ftable # Linear models
fitted, predict, resid, rstandard
lm, glm
hat, influence.measures
logLik, df, deviance
formula, ~, I
anova, coef, confint, vcov
contrasts # Miscellaneous tests
apropos("\\.test$") # Random variables
(q, p, d, r) * (beta, binom, cauchy, chisq, exp, f, gamma, geom,
hyper, lnorm, logis, multinom, nbinom, norm, pois, signrank, t,
unif, weibull, wilcox, birthday, tukey) # Matrix algebra
crossprod, tcrossprod
eigen, qr, svd
%*%, %o%, outer
rcond
solve

使用R

# Workspace
ls, exists, rm
getwd, setwd
q
source
install.packages, library, require # Help
help, ?
help.search
apropos
RSiteSearch
citation
demo
example
vignette # Debugging
traceback
browser
recover
options(error = )
stop, warning, message
tryCatch, try

输入/输出

# Output
print, cat
message, warning
dput
format
sink, capture.output # Reading and writing data
data
count.fields
read.csv, write.csv
read.delim, write.delim
read.fwf
readLines, writeLines
readRDS, saveRDS
load, save
library(foreign) # Files and directories
dir
basename, dirname, tools::file_ext
file.path
path.expand, normalizePath
file.choose
file.copy, file.create, file.remove, file.rename, dir.create
file.exists, file.info
tempdir, tempfile
download.file, library(downloader)

Advanced R之词汇表的更多相关文章

  1. Advanced R之函数

    转载请注明出处,谢谢. 再次声明下,本人水平有些,错误之处敬请指正. 函数 函数是R基本的块结构单元:为了掌握本书中的更高级技术,你需要对函数有扎实的了解.也许你已经写过一些函数,并了解函数的基本知识 ...

  2. C++ 词汇表

    C++词汇表 A abort()                       特殊函数 如果一个函数抛出异常,但在通往异常函数的调用链中找不到与之匹配的catch,则该程序通常以此函数调用终止 abs ...

  3. Transformers 词汇表 | 二

    作者|huggingface 编译|VK 来源|Github 词汇表每种模型都不同,但与其他模型相似.因此,大多数模型使用相同的输入,此处将在用法示例中进行详细说明. 输入ID 输入id通常是传递给模 ...

  4. Paip.语义分析----情绪情感词汇表总结

    Paip.语义分析----情绪情感词汇表总结 以下词语是按感情色彩共分为十四类: 作者Attilax  艾龙,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:h ...

  5. CSS Vocabulary – CSS 词汇表,你都掌握了吗?

    CSS 是前端开发必备技能,入门容易,深入难.比如像 Pseudo-class.Pseudo-element.Media query.Media type 以及 Vendor prefix 的概念,很 ...

  6. .Net词汇表中常见缩略语汇总

    .Net中存在大量的专业词汇(详细列表,请参考:Visual Studio 和 .NET Framework 词汇表),其中很多词汇常常采用缩略语的形式被大量使用. 在阅读.Net书籍或网络资料时,便 ...

  7. USD词汇表(USD Glossary)

    这篇文章是在学习USD的过程中龟速写成的,目的是将USD的核心设计.相关概念的说明.以及配套API整理出来,为后续进行的USD开发工作提供中文资料支持. 实际上也只有充分理解了USD设计中的每一个知识 ...

  8. 腾讯互动课堂(Tencent Interact Class,TIC)SDK 词汇表

    词汇表 https://cloud.tencent.com/document/product/266/11732 封装格式 封装格式(Format)是将已经编码压缩好的视频流和音频流按照一定的格式规范 ...

  9. IT词汇表

    本人采集到了数十万篇中文技术类博客,进行分词后根据出现的词频手工整理了一份IT词汇表,共计12000个,基本囊括了常见的中英文IT词汇,欢迎各位提出交流意见. 点此 下载

随机推荐

  1. mongodb distinct去重

    MongoDB的destinct命令是获取特定字段中不同值列表.该命令适用于普通字段,数组字段和数组内嵌文档. mongodb的distinct的语句: db.users.distinct('last ...

  2. memcached系列

    memcached系列:http://blog.csdn.net/xingxing513234072/article/category/2462865

  3. vue-cli与后台数据交互增删改查

    1. 安装vue-resource npm install vue-resource --save 2.访问后台地址,在vue中会出现跨域的问题,以下为解决方案 在config下的index.js 中 ...

  4. android菜鸟学习笔记16----Android项目打包安装过程(Run as Android Application)

    右击项目名称,Run as Android Appication之后,Android项目打包安装过程: 1.打包生成.apk文件: 1)把源码中的.java文件编译生成.class文件 2)将所有的. ...

  5. JavaEE详解

    本文主要讲JavaEE相关知识. 一 JavaEE 简介 JavaEE是很多技术的合集.提供了一套做B/S结构应用时,可能遇到问题的一套解决方案. 例如:处理客服端请求的servlet技术方案.处理数 ...

  6. 题解 CF576C 【Points on Plane】

    题解 CF576C [Points on Plane] 一道很好的思维题. 传送门 我们看这个曼哈顿距离,显然如果有一边是按顺序排列的,显然是最优的,那另一边怎么办呢? 假如你正在\(ioi\)赛场上 ...

  7. .idea文件夹是干嘛的

    question python为什么每次创建的文件目录下都含有.idea/文件夹,该文件夹又是用来干嘛的 answer 当使用pycharm作为IDE时,会自动生成.idea/文件夹来存放项目的配置信 ...

  8. Data Structure Binary Search Tree: Inorder Successor in Binary Search Tree

    struct node { int val; node *left; node *right; node *parent; node() : val(), left(NULL), right(NULL ...

  9. java开发环境搭建-1

    安卓开发所需软件: JDK Eclipse Android-Sdk ADT 其中jdk的下载和安装,详细见http://www.cnblogs.com/zhuxiaohui/p/3620685.htm ...

  10. appium不支持Android7.0系统设备解决办法

    1. 找到appium的安装目录下的adb.js文件. 2. 打开adb.js,手动修改该文件下的内容: Adb.prototype.getPIDsByName=function(name,cb){ ...