ropensci / oai

OAI-PMH R client
https://docs.ropensci.org/oai
Other
14 stars 4 forks source link

function 'check_as' is missing #55

Closed patperu closed 5 years ago

patperu commented 5 years ago

Hi Scott, the last commit added a call for check_as https://github.com/ropensci/oai/blob/39102ff4c8ebd08cbe9ac836976bd70e7769c47b/R/id.R#L24 but the function is missing.

Maybe something like this?

# check as ----------------------------------------
check_as <- function(as) {
  if (!as %in% c('parsed', 'raw')) {
    stop(sprintf("'%s' not in acceptable set: parsed, raw", as) ,
         call. = FALSE)
  }
}

:wave: Patrick

sckott commented 5 years ago

thanks @patperu ! Sorry about that, I have some unpushed changes locally, i'll push those today and see if this is sorted out. - that's pretty darn close to what i have

sckott commented 5 years ago

okay, pushed up