
R手册
文章平均质量分 69
WilenWu
本站已停止更新,查看最新内容请移步至本人 github 个人网站
展开
-
R手册(Syntax)--purrr
purrr : A functional programming(FP) toolkit for R文章目录Apply FunctionsWork with ListsReduce ListsDebugWork with TibblesApply Functionsmap(.x, .f, ...) Apply a function to each element of a list or v...原创 2019-10-18 17:17:58 · 550 阅读 · 0 评论 -
R手册(Model Tools)--modelr
文章目录modelr :辅助管道建模分区和采样交叉验证抽样模型质量指标与模型交互modelr :辅助管道建模modelr软件包提供的功能可以帮助您在建模时创建精美的流水线。分区和采样resample(data, idx) 抽取idx向量指定的观测值resample_partition(data, p) 按p向量给定的值分区rs <- resample(mtcars, 1:10)...原创 2019-10-18 17:04:42 · 1221 阅读 · 0 评论 -
R手册(Visualise)--gganimate(ggplot2 extensions)
目录ggplot2 extensionsggforce::geom_arc_bar(): 饼图plotROC :ROC曲线ggiraph: html交互ggaltggtree: 树状图geomnet: 网格图(关系图)gganimate:动画ggplot2 extensionsggforce::geom_arc_bar(): 饼图r 方...原创 2018-05-28 16:45:17 · 775 阅读 · 0 评论 -
R手册(Tidy+Transform)--forcats
目录 forcats: for factorforcats: for factor 函数 说明 factor(x,levels,labels,ordered) as_factor(x) fct_expand(f, …) 添加更多级别 fct_explicit_na(f, na_level = “(Missin...原创 2018-05-28 16:35:03 · 816 阅读 · 0 评论 -
R手册(Tidy+Transform)--tidyr
目录 tidyr: Easily tidy data with spread and gather functions.Reshape DataSplit or Unit CellsHandle Missing Valuestidyr: Easily tidy data with spread and gather functions.Resha...原创 2018-05-28 16:33:39 · 555 阅读 · 0 评论 -
R手册(Machine Learning)--mlr (Part 2)
目录Configuration (配置)Parallelization (并行)Imputation (插补)Feature Extraction (特征抽取)1. Feature filtering(特征筛选)2. Feature selection(特征选择)Benchmarking (基准点)Visualization (可视化)1. Performance(表...原创 2018-06-04 00:36:46 · 3472 阅读 · 1 评论 -
R手册(Common)--R语言入门
目录Take control of your R code数据处理一般流程R数据结构Take control of your R codeRStudio是R的集成开发环境(IDE)。它包括一个控制台,支持直接代码执行的语法高亮编辑器,以及绘图,历史记录,调试和工作区管理工具。RStudio可用于开源和商业版本,并可在桌面(Windows,Mac和Lin...原创 2018-05-26 19:29:50 · 3273 阅读 · 0 评论 -
R手册(NLP)--jiebaR
NaturalLanguageProcessing(NLP)jiebaR: for Chinese text segmentationwordcloud2 :Create wordcloud by wordcloud2.jstext2vec分词器I/O 处理(迭代器):支持create_函数向量化主题模型jiebaR: for Chinese text ...原创 2018-05-04 17:43:15 · 2577 阅读 · 1 评论 -
R手册(Time Series)--forecast and prophet
R手册(Time Series)–zoo,forecast and prophetzooPart 1 基础对象Part 2 ggplot2扩展Part 3 数据清洗Part 4 缺失值处理Part 5 显示控制forecast : for Time Series and Linear ModelsPart 1 时间序列分析Part 2 模型Part 3 预测Part...原创 2018-05-04 17:02:36 · 1743 阅读 · 0 评论 -
R手册(Time Series)--zoo
目录zoo基础对象ggplot2扩展数据清洗缺失值处理显示控制zoo基础对象zoo(x = NULL, order.by = index(x), frequency = NULL)有序的时间序列对象 zooreg(data, start = 1, end = numeric(), frequency = 1)规则的的时间序列对象,继承zoo对象 ...原创 2018-05-28 16:55:01 · 3514 阅读 · 1 评论 -
R手册(Communicate)--shiny
目录ShinyBuild an AppInputsOutputsLayouts(布局)Reactivity(反应)ShinyShiny是来自RStudio的软件包,它使得用R构建交互式Web应用程序变得非常简单。Build an AppA Shiny app is a web page (UI) connected to a comput...原创 2018-05-23 23:44:24 · 1095 阅读 · 0 评论 -
R手册(NLP)--wordcloud2
目录wordcloud2 :Create wordcloud by wordcloud2.jswordcloud2 :Create wordcloud by wordcloud2.jswordcloud2(data, size = 1, #按照data中词的排列顺序由内至外画图 fontFamily = 'Segoe UI', fontWei...原创 2018-05-28 18:41:43 · 1255 阅读 · 0 评论 -
R手册(NLP)--text2vec
目录text2vec分词器I/O 处理(迭代器):支持create_函数向量化主题模型text2vec分词器word_tokenizer(strings) 英语分词器 jieba<-jiebaR::worker()中文分词器#RUN THIS EXAMPLE:jieba<-jiebaR::worker()tok_fun &l...原创 2018-05-28 18:44:11 · 2749 阅读 · 0 评论 -
R手册(Visualise)--ggforce(ggplot2 extensions)
ggplot2 extensionsggforce: 饼图geom_arc_bar() r 方法一: ggforce::geom_arc_bar(aes(x0,y0,r0,r,start,end,explode), data, stat = &quot;arc_bar&quot;,position = &quot;identity&quot;, n = 360, na.rm = FALSE) 方法...原创 2018-05-29 18:24:52 · 1132 阅读 · 0 评论 -
R手册(Visualise)--geomnet(ggplot2 extensions)
ggplot2 extensionsgeomnet: 网格图(关系图) geom_net(aes(from_id,to_id,fontsize), data , stat = &quot;net&quot;, position = &quot;identity&quot;, na.rm = FALSE, layout.alg, #layout.alg布局 directed=FALSE,selfloop...原创 2018-05-29 18:26:11 · 768 阅读 · 0 评论 -
R手册(Visualise)--ggplot2 extensions
ggplot2现在具有官方扩展机制,[ggplot2 extensions官方站点](http://www.ggplot2-exts.org/ggiraph.html)跟踪并列出了R用户在社区中开发的ggplot2扩展。目的是使R用户可以轻松找到已开发的扩展。原创 2018-05-30 22:12:06 · 676 阅读 · 0 评论 -
R手册(Visualise)--GGally(ggplot2 extensions)
目录GGally返回ggplot2扩展主目录GGally原创 2018-05-30 23:32:36 · 5956 阅读 · 1 评论 -
R手册(Visualise)--REmap
目录REmap:(简单动态地图)Create html maps by Echarts迁移图(无缩放中国地图)填色地图(+迁移图)热力图:(+迁移图)调用baiduAPI绘图For shinyREmap:(简单动态地图)Create html maps by Echartsget_geo_position(city_vec)获得城市坐标迁移图(无...原创 2018-06-01 14:24:23 · 1438 阅读 · 0 评论 -
Python手册(Python Basics)--RPy2
rpy2概述IPython魔法接口(rmagic)概述Python是一种流行的通用脚本语言,而R(S/Splus语言的开源实现)是一种主要用于数据分析,统计和图形的脚本语言。rpy2 是一个嵌入在Python进程中的R接口.pip install rpy2子模块说明rpy2.rinterfaceLow-level interface to R,Close to R...原创 2018-12-23 22:05:50 · 908 阅读 · 1 评论 -
R手册(Machine Learning)--mlr(Part 1)
R手册(Machine Learning)–mlrmlr: 分类,回归,聚类,生存xgboostmlr: 分类,回归,聚类,生存summarizeColumns(obj)data.frame or Task的汇总说明 impute(obj)data.frame or Task缺失的数据进行插补 capLargeValues(obj,cols=NULL) 离群值...原创 2018-05-04 01:08:17 · 3242 阅读 · 0 评论 -
R手册(Model Tools)--broom
R手册(Model Tools)–broom and modelrbroom:Convert statistical analysis objects into tidy formatmodelr :辅助管道建模分区和抽样交叉验证模型质量指标添加预测和残差broom:Convert statistical analysis objects into tidy...原创 2018-05-04 00:43:40 · 1358 阅读 · 0 评论 -
正则表达式
正则表达式是对字符串(包括普通字符(例如,a 到 z 之间的字母)和特殊字符(称为“元字符”))操作的一种逻辑公式,就是用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。正则表达式是一种文本模式,该模式描述在搜索文本时要匹配的一个或多个字符串。原创 2018-05-01 18:26:12 · 382 阅读 · 0 评论 -
R手册(Import)--rvest
爬虫rvest1. 解析html2. 提取组件3. 提取,修改和提交形式的函数4. 浏览网站rvest1. 解析html 函数 说明 read_html(x, …, encoding = “”) x为a url或 a local path html_nodes(x, css, xpath) 通过使...原创 2018-05-01 17:49:56 · 767 阅读 · 0 评论 -
R手册(Import)--for database
databaseDBI: definition for communication between R and RDBMSsDBI: definition for communication between R and RDBMSs DBI只使用 “front-end” API ,通过调用”drivers”(其他包)与特定的 DBMSs (SQLite, M...原创 2018-05-01 17:42:54 · 338 阅读 · 0 评论 -
R手册(Import)--for csv, xlsx and json
目录readr: Read Rectangular Text Data|readxl : for excelopenxlsx : xlsx reading, writing and editingjsonlite: for jsonreadr: Read Rectangular Text Data|读入read_csv(file, col_names ...原创 2018-05-01 17:40:30 · 1418 阅读 · 0 评论 -
R手册(Common)--面向对象(R6 and S4)
目录面向对象R6类Part 1 创建R6类Part 2 实例化函数Part 3 R6类的动态绑定Part 4 R6默认方法面向对象S4类Part 1 自定义S4类Part 2 实例化函数Part 3 S4的泛型函数面向对象R6类library(R6)Part 1 创建R6类R6Class(classname =...原创 2018-05-01 17:37:07 · 680 阅读 · 0 评论 -
R手册(Common)--data.table
data.tablePart 1 结构Part 2 特殊符号Part 3 更新data.tablePart 4 运算符Part 5 其他函数Part 1 结构DT[ i, j, by ,with=TRUE] + extra arguments | | --&amp;gt; grouped by what? | -...原创 2018-05-01 17:32:24 · 273 阅读 · 0 评论 -
R手册(Common)--tidyverse+tibble
目录tidyversemagrittr: pipetibbleforcats: for factortidyverse Usagesmall, in-memory data ( &amp;amp;amp;lt;2Gb): tidyverselarger data (10-100 Gb): data.tableParallel computing : need a...原创 2018-04-30 22:07:52 · 1037 阅读 · 0 评论 -
R手册(Common)--R语言基础包
R手册(common)–base and statsPart 1 系统函数环境设置输入输出文件操作进度条数据创建数据选取及数据信息列联表内置常量数学模型逻辑运算矩阵运算分布其他函数Part 2 控制语句与循环语句Part 3 调试Part 3 自定义函数Part 1 系统函数环境设置 函数 说明...原创 2018-04-30 17:22:51 · 2914 阅读 · 0 评论 -
R手册(Tidy+Transform)--dplyr and plyr
目录dplyr转换筛选聚合排序分组select and rename表连接: (base::merge)集合运算计数: (base::nrow)排名: (base::rank)去重: (base::duplicated, base::unique)提取 first, last or nth value from a vector抽样(data.frame)...原创 2018-05-01 20:01:45 · 848 阅读 · 0 评论 -
R手册(Tidy+Transform)--stringr
目录stringr: Simple, Consistent Wrappers for Common String OperationsstringiR语言编码stringr: Simple, Consistent Wrappers for Common String Operations 函数 说明 str_c(…, sep = “”...原创 2018-05-01 22:35:55 · 343 阅读 · 0 评论 -
R手册(Parallel Computing)--foreach
R手册(Parallel Computing)–foreachforeachforeach后端支持library(doParallel) #为foreah包提供一个并行的后端n_cores<-detectCores(logical=FALSE) #获得物理内核数registerDoParallel(cores=n_cores-1) #注册集群...原创 2018-05-04 00:34:33 · 334 阅读 · 0 评论 -
R手册(Visualise)--leaflet+leafletCN
R手册(Visualise)–leaflet+leafletCN and Remapleaflet(交互式地图的开源JavaScript库)Map Widget:地图控件Basemaps:底图(瓦片层)Markers:标记弹出窗口其他组件leafletCN(包含中国行政区划GeoJSON数据,leaflet部分函数封装,在线高德地图)GeoJSON地图数据及读取leaf...原创 2018-05-04 00:13:03 · 4446 阅读 · 1 评论 -
R手册(Visualise)--ggmap+baidumap
R手册(Visualise)–ggmap and baidumap ggmap: 静态地图,结合ggplot2作图作图函数: ggmapAPI获取地图:get_map经纬度信息路线:从Google获取路线图地图距离:使用Google地图计算地图距离baidumap: 百度APIgetBaiduMap:返回ggmap对象获取位置或坐标搜索百度地理编码...原创 2018-05-03 23:25:52 · 8385 阅读 · 4 评论 -
R手册(Visualise)--RColorBrewer and extrafont
目录RColorBrewer:调色板extrafont:字体RColorBrewer:调色板display.brewer.all(type="seq/div/qual") 查看调色板所有颜色 参数type: seq(序列型); div: 极端型; qual: 离散型brewer.pal(n, name) 颜色提取 Base R调色板: ...原创 2018-05-03 22:16:10 · 1303 阅读 · 0 评论 -
R手册(Visualise)--ggplot2
目录ggplot2Part 1 Plot basicsPart 2 Layer: geoms常用几何图形geom参数geom_ label and geom_textgeom_map and geom_sfmodelsothersPart 3 Layer: statsPart 4 Layer: position adjustmentPart 5 Layer: an...原创 2018-05-03 16:26:14 · 2512 阅读 · 0 评论 -
R手册(Syntax)--magrittr
目录tidyr:Easily tidy data with spread and gather functions.gather and spreead分列和联合NA删除和替换purrr : 函数化编程mapmap2 and pmapinvoke_mapwalk:并行处理递归:在列表中累积递归折叠列表处理函数 对map系列的返回值协调调试others...原创 2018-05-02 00:46:17 · 753 阅读 · 0 评论 -
R手册(Tidy+Transform)--缺失处理(naniar and simputation)
缺失值处理naniar1. 缺失数据摘要2. 阴影矩阵3. 可视化缺失值变量分布关系simputation : make imputation simpler for missing datananiar1. 缺失数据摘要 函数 说明 vis_miss(x) 缺失数据可视化摘要 miss_var_su...原创 2018-05-01 23:37:57 · 1016 阅读 · 0 评论 -
R手册(Tidy+Transform)--lubridate+hms
目录lubridate: Dates and times1. 获取当前时间2. 转换字符/数字变量 to Date or POSIXct objects3. 设置/获取date-time组成4. 快速建造period 对象5. othershms: storing time-of-day values|lubridate: Dates a...原创 2018-05-01 23:06:29 · 1093 阅读 · 0 评论 -
R手册(Communicate)--R Markdown
rmarkdown and shinyPart 1 RmarkdownPart 2 shinyPart 1 Rmarkdown R Markdown文件,一个纯文本文件,其扩展名为.Rmd 包括三部分内容: 1. YAML标头,—包围 2. R代码块,{r} 3. Markdown文本 4. library(rmar...原创 2018-04-30 15:45:28 · 2834 阅读 · 0 评论