aphalo / ggpmisc

R package ggpmisc is an extension to ggplot2 and the Grammar of Graphics
https://docs.r4photobiology.info/ggpmisc
94 stars 6 forks source link

Installation guidelines on Ubuntu 22.04.2 LTS #37

Closed atsyplenkov closed 1 year ago

atsyplenkov commented 1 year ago

Hi, please, consider adding an instruction on how one can install ggpmisc package on an Ubuntu machine. I have faced the problem that clean Ubuntu is lacking from not straight-forward dependencies:

sudo apt update
sudo apt install gfortran liblapack-dev libopenblas-dev r-cran-sparsem

only after that we can run

install.packages("ggpmisc")

FYI, my sessionInfo():

R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] ggpmisc_0.5.2 ggpp_0.5.1    ggplot2_3.4.1

loaded via a namespace (and not attached):
 [1] magrittr_2.0.3     splines_4.2.2      MASS_7.3-58.2      tidyselect_1.2.0
 [5] munsell_0.5.0      colorspace_2.1-0   lattice_0.20-45    R6_2.5.1
 [9] rlang_1.0.6        fansi_1.0.4        dplyr_1.1.0        tools_4.2.2
[13] grid_4.2.2         gtable_0.3.1       quantreg_5.94      utf8_1.2.3
[17] cli_3.6.0          withr_2.5.0        MatrixModels_0.5-1 survival_3.5-3
[21] tibble_3.1.8       lifecycle_1.0.3    Matrix_1.5-1       vctrs_0.5.2
[25] glue_1.6.2         compiler_4.2.2     pillar_1.8.1       generics_0.1.3
[29] scales_1.2.1       SparseM_1.81       pkgconfig_2.0.3
aphalo commented 1 year ago

Hi @atsyplenkov,

Thanks for your message.

The 'ggpmisc' package contains no compiled code. The requirement for a compiler must be in some of the R packages 'ggpmisc' depends on. On Linux R packages are in most cases not available as binaries and need to be built during instalaltion. R uses BLAS, so are you also installing R itself from sources? In addition R supports calls to C++, C, FORTRAN code that is included as part of packages, so this is more of requirement of any R installation than of a single package. Traditionally most Linux distributions have installed the compilers by default, but this has changed recently. I agree that this change must be made clearer somewhere, but adding this information to packages like 'ggpmisc' which do not themselves make use of these libraries or contain any compiled code, and thus do not themselves require a compiler to be installed is overkill.

atsyplenkov commented 1 year ago

Dear @aphalo,

Appreciate your prompt reply. Agree with your point. However, maybe info from this issue would be enough for most users. I.e. not deleting it would allow googling it.