This package provides R 4.0 with ability to read, modify, save the data stored in acmacs and lispmds files.
-
macOS 10.14.6
-
Linux
Rcpp 1.0.3 or later is required.
install.packages("Rcpp")
https://cran.r-project.org/web/packages/Rcpp/index.html R 4.0 is required, other versions are not supported!
Package is supposed to be installed from a binary archive for the specific platform. Building package from sources is complicated and it cannot be done within R.
install.packages(c("Rcpp", "devtools", "testthat", "roxygen2"))
install.packages(Find(function(asset) { grepl("macOS", asset$name, fixed=TRUE) }, devtools:::github_GET("repos/acorg/acmacs.r/releases/latest")$assets)$browser_download_url)
install.packages(c("Rcpp", "devtools", "testthat", "roxygen2"))
install.packages(Find(function(asset) { grepl("linux", asset$name, fixed=TRUE) }, devtools:::github_GET("repos/acorg/acmacs.r/releases/latest")$assets)$browser_download_url)
library(acmacs.r)
Complete example with the most of available functions can be accessed within R using ?acmacs.Example
library(acmacs.r)
chart <- new(acmacs.Chart, "/tmp/file.ace")
cat(chart$info)
ags <- chart$antigens
format_antigen <- function(a) {
paste(c(a$name, a$passage, a$reassortant, a$reference, a$annotations, paste("[", a$date, "]", sep="", collapse=""), a$lab_ids), collapse=" ", sep="")
}
cat("antigens:", length(ags), "\n ", paste(sapply(ags, format_antigen), collapse="\n "), "\n")