XiangyunHuang / data-analysis-in-action

:book: R 语言数据分析实战(写作中) Data Analysis in Action Using R
https://bookdown.org/xiangyun/data-analysis-in-action/
70 stars 18 forks source link

软件环境信息 #18

Open XiangyunHuang opened 2 years ago

XiangyunHuang commented 2 years ago

其它外部软件信息


> extSoftVersion()
                       zlib                       bzlib 
                   "1.2.13"        "1.0.8, 13-Jul-2019" 
                         xz                        PCRE 
                    "5.4.1"          "10.42 2022-12-11" 
                        ICU                         TRE 
                     "72.1"           "TRE 0.8.0 (BSD)" 
                      iconv                    readline 
               "glibc 2.37"                       "8.2" 
                       BLAS 
"FlexiBLAS OPENBLAS-OPENMP" 
> La_library()
[1] "FlexiBLAS OPENBLAS-OPENMP"
> La_version()
[1] "3.11.0"
> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua    http/ftp 
       TRUE        TRUE        TRUE        TRUE       FALSE       FALSE        TRUE 
    sockets      libxml        fifo      cledit       iconv         NLS       Rprof 
       TRUE       FALSE        TRUE        TRUE        TRUE        TRUE        TRUE 
    profmem       cairo         ICU long.double     libcurl 
       TRUE        TRUE        TRUE        TRUE        TRUE 
> l10n_info()
$MBCS
[1] TRUE

$`UTF-8`
[1] TRUE

$`Latin-1`
[1] FALSE

$codeset
[1] "UTF-8"
> libcurlVersion()
[1] "8.0.1"
attr(,"ssl_version")
[1] "OpenSSL/3.0.8"
attr(,"libssh_version")
[1] "libssh/0.10.4/openssl/zlib"
attr(,"protocols")
 [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"   
 [8] "https"   "imap"    "imaps"   "ldap"    "ldaps"   "mqtt"    "pop3"   
[15] "pop3s"   "rtsp"    "scp"     "sftp"    "smb"     "smbs"    "smtp"   
[22] "smtps"   "telnet"  "tftp"
> grSoftVersion()
                   cairo                  cairoFT                    pango 
                "1.17.8"                       ""                "1.50.14" 
                  libpng                     jpeg                  libtiff 
                "1.6.37"                    "6.2" "LIBTIFF, Version 4.4.0" 
> pcre_config()
             UTF-8 Unicode properties                JIT              stack 
              TRUE               TRUE               TRUE              FALSE 
> 
XiangyunHuang commented 1 year ago
XiangyunHuang commented 1 year ago

目前,书籍的依赖环境相对稳定。

XiangyunHuang commented 1 year ago

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")
XiangyunHuang commented 1 year ago
XiangyunHuang commented 1 year ago

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" 
XiangyunHuang commented 1 year ago

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 命令查看可用的资源信息,如下

top
XiangyunHuang commented 1 year ago

Binder 免费提供的 RStudio 环境

binder rstudio

XiangyunHuang commented 1 year ago

soul 宏包不支持对中文划线 中文 已经报告给 soul 宏包作者, https://github.com/ho-tex/soul/issues/9

\documentclass{article}
\usepackage{ctex}
\usepackage{soul}
\begin{document}
% \st{中文} % 不支持
\st{delete}
\end{document}

通过重新新建命令 \st 解决问题

XiangyunHuang commented 1 year ago

最近更新 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 镜像可以解决问题