Skip to content

Potential clarification for accessionToTaxa and getAccessions documentation #76

Description

@mooreryan

I was thinking that the function docs for accessionToTaxa and getAccessions could mention that "version" is the default value for the version argument. Something like this maybe:

#' @param version either 'version' indicating that taxaids are versioned e.g. Z17427.1 or 'base' indicating that taxaids do not have version numbers e.g. Z17427 (default: 'version')

The function docs do state the two available options, but I wasn't sure what the default would be until I read the code and saw those functions calling match.arg. I guess a user might reasonably assume that the first element of that vector would be the default, but I wasn't sure until I read the code.

accessionToTaxa<-function(accessions,sqlFile,version=c('version','base')){

getAccessions<-function(taxaId,sqlFile,version=c('version','base'),limit=NULL){

What do you think?


Alternatively, the function signatures could change to something like this, which would make the default value clear.

accessionToTaxa <- function(accessions, sqlFile, version = 'version') { 
    version <- match.arg(version, choices = c('version', 'base'))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions