R/options.R

Defines functions .onUnload .onLoad

.onLoad <- function(libname, pkgname) {
  settings <- list(
    gm.musescore_path = NULL,
    gm.context = infer_context(),
    gm.show_to = c("score", "audio")
  )

  to_set <- !names(settings) %in% names(options())
  if (any(to_set)) options(settings[to_set])
  invisible()
}


.onUnload <- function(libpath) {
  settings <- list(
    gm.musescore_path = NULL,
    gm.context = NULL,
    gm.show_to = NULL
  )

  options(settings)
  invisible()
}

Try the gm package in your browser

Any scripts or data that you put into this service are public.

gm documentation built on Sept. 11, 2024, 6:11 p.m.