博文

目前显示的是 六月, 2019的博文

雷达图

#devtools::install_github("ricardo-bion/ggradar", dependencies = TRUE) library(ggradar) library(scales) library(tidyverse) data("mtcars") #rescale函数可以自动完成指标中0-1标准,最大值-最小值标准化,核心要义是将原始指标缩放到0~1之间的区间内。其公式为 EX = (x- min)/(max - min) mtcars_radar <- mtcars %>%   as_tibble(rownames = "group") %>%   mutate_at(vars(-group), rescale) %>%   tail(4) ggradar(mtcars_radar) data("iris") #将Species列从因子转化为字符串mutate_at(iris, vars(Species), as.character) #第一列为分组 iris_radar <- iris %>%   mutate_at(vars(-Species),rescale) %>%   select(5,1:4) ggradar(iris_radar)

ggplot2

library(tidyverse) ggplot(economics, aes(date, psavert, color = "savings rate")) +   geom_line(key_glyph = "timeseries") # key_glyph图例 #  geom_line(key_glyph = draw_key_rect) df <- data.frame(x = 1:10, y = (1:10)^2) ggplot(df, aes(x, y)) +   geom_point() +   stat_function(fun = ~ .x^2) library(sf) nc <- st_read(system.file("gpkg/nc.gpkg", package = "sf"), quiet = TRUE) ggplot(nc) +   geom_sf(data = nc, aes(fill = AREA)) +   theme_void()

caj2pdf 使用

sudo pip install PyPDF2 sudo apt install mupdf mupdf-tools ./caj2pdf convert test.caj -o output.pdf

descriptr包

--- title: "descriptr包" author: "xuefliang" date: "6/14/2019" output: html_document: theme: readable highlight: haddock df_print: paged code_folding: show toc: true number_sections: true fig_width: 10.08 fig_height: 6 editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} library(descriptr) knitr::opts_chunk$set(echo = TRUE,warning = FALSE,message = FALSE,comment=">") options(knitr.kable.NA = '',digits=2) ``` ## 数据展示 通过ds_screener()函数进行静态数据集展示,替代函数原系统的str()函数。 ```{r} ds_screener(mtcarz) ``` ## 统计概览 通过ds_summary_stats()函数,查看数据集中某个连续型变量的所有统计特征值。 ```{r} ds_summary_stats(mtcarz,mpg) ``` 输出分成了3个部分:Univariate Analysis(单变量分析),Quantiles(分位数),Extreme Values(极值)。 Univariate Analysis(单变量分析),包括N(个数),Missing(缺失值),Mean(均值),Median(中位数),Mode(众数),Trimmed Mean(修正均值),Skewness(偏度),Kurtosis(峰度),Variance(方差),Std Deviation(标准差),Range(范围,最大-最小),Interquartile Range(四分位数范围),Uncorrected SS(未修正平方

ShadowsocksR Plus 就回来了~

现在最新代码加了个package/openwrt-packages目录,我的操作方法: mkdir ~/lede/package/openwrt-packages cd ~/lede/package/openwrt-packages git clone https://github.com/SuLingGG/luci-app-ssr-plus ./luci-app-ssr-plus cd lede git reset --hard 2915c44 参考:https://github.com/coolsnowwolf/lede/commit/b5daaadc0c6c17397efbc4d5c281c75b2bc571d7#commitcomment-33616316

yyplot 应用

--- title: "Untitled" author: "xuefliang" date: "6/15/2019" output: html_document --- ```{r} devtools::install_github("GuangchuangYu/yyplot") library(yyplot) library(tidyverse) ``` ## 关键字 键入你要搜索的关键字 ```{r} term <- c("Lung Adenocarcinoma", "NSCLC", "SCLC") ``` 进行检索,指定起止年 ```{r} pm <- pubmed_trend(term, year=2010:2019) ``` 绘图 ```{r} plot(pm) + theme_bw() ``` 注意纵坐标是一个比例,该关键字发表文章数与当年文章总数的比例值,我们也可以灵活一点,只绘制发表文章数目: ```{r} ggplot(pm, aes(x=year, y=number, color=TERM)) + geompoint() + geomline() + theme_bw() + xlab("Year") + ylab("Number of Publication per Year") ``` 画出某个研究人员,历年来发表文章的数目 ```{r} pubmedtrend("Yu Guangchuang[Full Author Name]", 2010:2016) ``` ```{r} d <- data.frame(x=rnorm(10), y=rnorm(10), lab=LETTERS[1:10]) p <- ggplot(d, aes(x, y)) + geomtext(aes(label=lab, color=lab), size=10) + geom_text(aes(y, x, label=lab), size=3) ``` ## 设置字体 一次性设置所有字体包括family

shutter截图注释工具

sudo apt install libgoocanvas-common libgoocanvas3 libgoo-canvas-perl shutter