Comments (9)
- 在 MacOS 上,如果以
brew install r
方式安装 R 软件,则后续安装 R 包都是从源码安装,而且一旦安装,就不要轻易升级系统软件依赖,比如 gdal 3.6.3 arrow 11.0.0 发布新版本后,重新安装 sf terra arrow 包,之后不再轻易升级软件,否则无法使用这些 R 包。如果更新 gdal 和 proj 的上游依赖,如 libtiff ,则必须同时更新 gdal 和 proj 否则 sf terra 等包就不能安装和使用,依赖的连锁反应。 r-spatial/sf#2217 - tensorflow 目前还不支持 Python 3.11 tensorflow/tensorflow#58032
from data-analysis-in-action.
目前,书籍的依赖环境相对稳定。
- r、pandoc、quarto 的升级要慎重,会对本书整体产生影响。
- ggplot2 和 dplyr 大版本升级也会对书的多个章节产生重大影响。
- 余下还有 sf rgl gt 等包,遇到重大升级,得新建分支。
from data-analysis-in-action.
ganttrify 和 ggradar 依赖颇多,且使用风格与 ggplot2 很不一样,故暂移除。
甘特图 {#sec-gantt}
甘特图常用于项目、流程管理,描述节点之间的依赖关系,展示关键节点。 ganttrify 包专门用来绘制甘特图,如 @fig-gant 所示。
#| label: fig-gant
#| fig-cap: "项目和任务进展"
#| fig-width: 7
#| fig-height: 4.5
#| fig-showtext: true
library(ganttrify)
ganttrify(project = ganttrify::test_project,
project_start_date = "2021-03",
font_family = "sans")
雷达图 {#sec-radar}
ggradar 包绘制雷达图对比美国三个州的数据,根据人口密度,从 state.x77 选择康涅狄格州 Connecticut, 马塞诸塞州 Massachusetts, 新泽西州 New Jersey,比较它们的人均收入 Income,文盲率 Illiteracy, 预期寿命 Life Exp,谋杀率 Murder 和高中毕业率 HS Grad。 函数 ggradar()
要求数据集各个比较的变量归一化到 0-1 区间。
#| label: fig-state-x77-comp
#| fig-cap: "康涅狄格州、马塞诸塞州、新泽西州的比较"
#| fig-width: 7.5
#| fig-height: 4
#| fig-showtext: true
#| warning: false
state_x77 <- data.frame(state.x77,
state_name = rownames(state.x77),
state_region = state.region,
check.names = FALSE
)
state_x77_sub <- state_x77[
c("Connecticut", "Massachusetts", "New Jersey"),
c("Income", "Illiteracy", "Life Exp", "Murder", "HS Grad")
]
state_x77_scale <- apply(state_x77_sub, 2, scales::rescale)
state_x77_comp <- data.frame(state = rownames(state_x77_scale), state_x77_scale)
library(ggradar)
ggradar(plot.data = state_x77_comp, base.size = 13, legend.position = "right")
from data-analysis-in-action.
- gifski 必须从源码安装, fedora 仓库不提供编译版本。
- showtext 必须从源码编译,才能使用系统字体。
- 安装 V8 包需要设置环境变量
export DOWNLOAD_STATIC_LIBV8=1
- 导出高质量的 mermaid 制作的图片,需要安装 chromium
https://quarto.org/docs/authoring/diagrams.html
from data-analysis-in-action.
sf
sf::sf_extSoftVersion()
GEOS GDAL proj.4 GDAL_with_GEOS USE_PROJ_H
"3.11.2" "3.6.4" "9.2.0" "true" "true"
PROJ
"9.2.0"
from data-analysis-in-action.
Binder 环境
启动 Binder 环境后,进入 RStudio IDE,在 Terminal 窗口中查看 CPU 信息
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 72
On-line CPU(s) list: 0-71
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 18
Socket(s): 2
Stepping: 4
CPU max MHz: 2300.0000
CPU min MHz: 1000.0000
BogoMIPS: 4600.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca c
mov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_per
fmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid ap
erfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est t
m2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2
apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rd
rand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_
l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp
tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_
adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rd
t_a avx512f avx512dq rdseed adx smap clflushopt clwb intel
_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsa
ves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dthe
rm arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku
ospke md_clear flush_l1d arch_capabilities
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 1.1 MiB (36 instances)
L1i: 1.1 MiB (36 instances)
L2: 36 MiB (36 instances)
L3: 49.5 MiB (2 instances)
NUMA:
NUMA node(s): 2
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,
42,44,46,48,50,52,54,56,58,60,62,64,66,68,70
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,
43,45,47,49,51,53,55,57,59,61,63,65,67,69,71
Vulnerabilities:
Itlb multihit: KVM: Mitigation: VMX disabled
L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes,
SMT vulnerable
Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Meltdown: Mitigation; PTI
Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Retbleed: Mitigation; IBRS
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl an
d seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sa
nitization
Spectre v2: Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-eIB
RS Not affected
Srbds: Not affected
Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
top 命令查看可用的资源信息,如下
from data-analysis-in-action.
Binder 免费提供的 RStudio 环境
from data-analysis-in-action.
soul 宏包不支持对中文划线 中文
已经报告给 soul 宏包作者, ho-tex/soul#9
\documentclass{article}
\usepackage{ctex}
\usepackage{soul}
\begin{document}
% \st{中文} % 不支持
\st{delete}
\end{document}
通过重新新建命令 \st
解决问题
from data-analysis-in-action.
最近更新 R-CoprManager 导致 GPG 验证错误,问题原因未知。
https://copr.fedorainfracloud.org/coprs/iucar/cran/
https://github.com/Enchufa2/cran2copr
也可能是下面的原因
Warning! Scheduled outage of Copr servers - 2023-08-16 12:30-14:30 UTC. For more information please refer to this ticket.
直接用 cran2copr 制作的 Docker 镜像可以解决问题
from data-analysis-in-action.
Related Issues (20)
- 章节写作 or 修改认领 HOT 2
- 一些 R 包问题
- 一些数据问题
- 自动测试问题
- EPUB 格式输出问题 HOT 1
- 一些 Quarto 的问题 HOT 1
- 书籍中交互网页图形的截图操作 HOT 1
- 一些参考书籍
- 404 page not found HOT 1
- CRAN 开发者/扩展包关系网络
- 聚类分析
- 时间序列预测
- 文本分析
- Spark SQL
- 数组操作
- 排序问题
- 预测问题
- Quarto 1.4.x 升级 HOT 4
- 发现宝藏!!! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-analysis-in-action.