Closed schoolAccountMajaG closed 4 years ago
What do you mean by libraries? R packages? If so, it should be in the DESCRIPTION function. If not, should it be in the vignette or in a helper function?
On Wed, Jun 12, 2019 at 2:36 PM Maja notifications@github.com wrote:
It would be cool if all the libraries that are used/necessary were listed in the documentation + read in at the beg of the vignette
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lhenneman/hyspdisp/issues/22?email_source=notifications&email_token=AA73AZKYAPGQKQCKPYB64QTP2DUVZA5CNFSM4HXIQQNKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZBUASA, or mute the thread https://github.com/notifications/unsubscribe-auth/AA73AZKNKMYCTSWQTD4LS53P2DUVZANCNFSM4HXIQQNA .
Yes, R packages should be all listed in one place in the documentation. Also in the vignette for example like that:
We will be using the following packages:
The code below will check if you have the necessary packages installed and install them in case they are are not installed.
`
list.of.packages <- c("hyspdisp", "openxlsx", "ncdf4", "parallel", "sf", "viridis", "scales", "ggsn", "SplitR", "tidyverse")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages) `
We load the required packages/libraries below.
library(hyspdisp) library(openxlsx) library(ncdf4) library(parallel) library(sf) library(viridis) library(scales) library(ggsn) library(SplitR) library(tidyverse)
You really want/should handle this at the R package level, see, e.g., http://r-pkgs.had.co.nz/description.html.
On Wed, Jun 12, 2019 at 4:14 PM Maja notifications@github.com wrote:
Yes, R packages should be all listed in one place in the documentation. Also in the vignette for example like that:
We will be using the following packages:
- "hyspdisp"
- "openxlsx"
- "ncdf4"
- "parallel"
- "sf"
- "viridis"
- "scales"
- "ggsn"
- "SplitR"
- "tidyverse"
The code below will check if you have the necessary packages installed and install them in case they are are not installed.
` If packages are not installed this code will install them
list.of.packages <- c("hyspdisp", "openxlsx", "ncdf4", "parallel", "sf", "viridis", "scales", "ggsn", "SplitR", "tidyverse")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages) `
We load the required packages/libraries below.
library(hyspdisp) library(openxlsx) library(ncdf4) library(parallel) library(sf) library(viridis) library(scales) library(ggsn) library(SplitR) library(tidyverse)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lhenneman/hyspdisp/issues/22?email_source=notifications&email_token=AA73AZPEGDFXP6LVLY3TYJLP2EAFLA5CNFSM4HXIQQNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQR76Y#issuecomment-501293051, or mute the thread https://github.com/notifications/unsubscribe-auth/AA73AZN2LJUYJOA3LL3HSF3P2EAFLANCNFSM4HXIQQNA .
handled at package level in disperseR
It would be cool if all the libraries that are used/necessary were listed in the documentation + read in at the beg of the vignette