Comments (3)
follow-up note for dev team: we may be able to provide an in-package function (with OS an R version params) at some point that generates a bundle for offline installation (including an R script that installs everything once executed on the offline system) using the recursive dependency retrieval function of the miniCRAN package. This would make it a lot easier for users with offline IRMS systems.
from isoreader.
Hi @BrianEads, this is a problem that's come up in the past with offline IRMS systems so we started writing some documentation for it but haven't posted it yet. I'm pasting the current draft below and would very much welcome any feedback on whether it works and if not where it fails. Eventually we'll add this to the main README.md
so it's easy to find.
Installing on a system not connected to the internet
IRMS instrumentation is sometimes kept offline to prevent problems with automatic Windows updates and viruses. This requires an offline installation of isoreader
to make it possible to use the package directly on the instrument computer (which is typically an older Windows machine).
For this to work, you need to download all the packages that isoreader depends on as well as all packages that those dependencies depend on which can get pretty elaborate pretty quickly. The easiest way to make this possible is thus by just pulling all current release packages from CRAN and transferring them to the offline system (warnings, these are a lot of files, several Gb total, and may take a long time to download). The CRAN directory depends on the operating system, R version (must match!) and source vs. binaries. For example, to download all the R 3.5.x windows binaries, run in the following in a terminal (Note: these are unix/MacOS syntax, not sure exactly about the Windows equivalent):
mkdir CRAN_packages
cd CRAN_packages
wget -nc ftp://cran.r-project.org/pub/R/bin/windows/contrib/3.5/*.zip
As well as the package(s) hosted on GitHub (run in terminal within CRAN_packages folder), which need to be converted to tar balls for installation (zip files don't work with install.packages
):
mkdir GitHub_packages
cd GitHub_packages
curl -L -o tmp.zip https://github.com/isoverse/isoreader/archive/master.zip && unzip tmp.zip && rm tmp.zip
Transfer all these files to the offline system e.g. via USB stick, specify the source_path
, then generate a package dependency tree (platform dependent) from an RStudio command line or R console, and install the GitHub packages from the sources files.
Dependency tree:
source_path <- "C:/path/to/CRAN_packages" # windows
#source_path <- "/path/to/CRAN_packages" # unix
library(tools)
write_PACKAGES(source_path, type = "win.binary")
#write_PACKAGES(source_path, type = "mac.binary")
Installation:
# local repository
url <- paste0("file:", source_path) # windows
#url <- paste0("file:\\", source_path) # unix
# install devtools
install.packages("devtools", contriburl = url)
# install github package(s) with dependencies
sapply(c("isoreader"), function(i) {
pkg_path <- file.path(source_path, "GitHub_packages", paste0(i, "-master"))
stopifnot(file.exists(pkg_path))
deps <- devtools::dev_package_deps(pkg_path, dep = T)$package
install.packages(deps, contriburl = url)
tryCatch(devtools::install(pkg_path), error = function(e) message("NOTE: ", e$message))
return("")
})
Note that sometimes Rgui.exe on windows will throw an error along the lines of "The procedure entry point ... could not be located in the dynamic library ..." when trying to load the newly installed packages during installation. This can be safely ignored and packages that otherwise installed without trouble should load okay when loading them with library()
.
Updating a system not connected to the internet
If you're just updating an existing offline installation with a new version of any of the packages (simplest case: a new version of isoreader), download the latest version of the package from github.com/isoverse/isoreader/archive/master.zip, unzip the archive and transfer the isoreader-master
folder to the offline system. Then start RStudio or an R console, set your working directory (setwd("path_to_folder")
) to the folder where isoreader-master
is located (not the isoreader-master
folder itself, one folder above that), and run the following command. Adjust as needed for updating other packages.
devtools::install("isoreader-master", reload = FALSE)
from isoreader.
thanks so much for the prompt and VERY detailed reply! I really appreciate your efforts. If we do decide to go down the route of installing on the non-networked computer, I will keep you posted - it does have an open USB so we can copy the data off to another (networked) machine instead.
from isoreader.
Related Issues (20)
- see if R 3.6 support is feasible HOT 1
- allow `NULL` as name for iso_format to suppress selective exclusion of name
- iso_get_raw_data's include_file_info column repeats first value HOT 2
- read component from IsoDat .dxf files HOT 6
- issue reading termination sequence of a dxf file HOT 1
- implement support for reading Sercon Integra 2 files HOT 3
- fix futures warning in parallel processing HOT 1
- allow factors in file info
- switching file info inside a run to account for injection skips HOT 1
- 'iso_get_vendor_data_table' unable to select manually edited peak rows from .dxf files HOT 2
- support for elementar ionOS .iarc version 3 HOT 2
- rename `iso_export_to_excel` to `iso_export_files_to_excel` to avoid ambiguity HOT 1
- units for vendor data table from .did dual inlet files are not read out
- update readme and DESCRIPTION with info about JOSS paper HOT 1
- finally retire plotting functions (have been deprecated and moved to isoprocessor for a while) HOT 1
- CRAN version unavailable HOT 2
- use apache arrow for feather/parquet instead of feather directly
- implement C++ or rust backend for isoreader
- Can't read odd .did files
- vendor data table precision differences error
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 isoreader.