CURRENTLY ONLY SUPPORTS WINDOWS

Overview

This package was created to help USGS model authors archive models written in R. Special attention must be paid to R model archiving because of variations in R versions and package dependencies. The modelArchive package is a collection of functions that help the model author aggregate all the required files for a complete R model archive.

Workflow

Create a model archive folder with the required sub directories

createFolder(folderPath = NULL,
             folderName = "modelArchive")

Copy script files into model archive. This function can take specified script file names, or by default copies all scripts in the current working directory

copyScripts()

Get the R version cooresponding to the R version used currently by the model author.

getR()

Get all external package dependencies required by the model and add to the model archive.

bundlePackages()

Make a basic readme file describing the model archive

makeReadMe(modelDescription = "This is a test of the emergency broadcast system.")

Make a basic .meta metadata file describing the each dataframe used in the model

dataDoc(dataFrame = "dataset1",fileName = "dataset1.meta")
dataDoc(dataFrame = "dataset2",fileName = "dataset2.meta")

Run a basic check on the model archive files and documentation

checkArchive()

Bundle archive to send to review

bundleArchive()

Review an archive recieved

unbundleArchive(bundle="sharedArchive.tar.gz",where = "myReviewFolder")


USGS-R/modelArchive documentation built on May 9, 2019, 8:38 p.m.