ropensci / taxize

@@ -78,7 +78,7 @@
Loading
78 78
  # aggregate to family level (by querying NCBI for taxonomic classification)
79 79
  uniq_tax <- as.character(unique(df_m$variable))
80 80
  agg <- tax_name(uniq_tax, get = rank, db = db, messages = messages, ...)
81 -
  lookup <- data.frame(variable = uniq_tax, agg = agg[ , 3], stringsAsFactors = FALSE)
81 +
  lookup <- data.frame(variable = uniq_tax, agg = agg[ , 3, drop = TRUE], stringsAsFactors = FALSE)
82 82
83 83
  # merge lookup with orig.
84 84
  df_merged <- merge(lookup, df_m, by = 'variable')

@@ -179,7 +179,7 @@
Loading
179 179
c2s_tp <- function(simplify, ...){
180 180
  tmp <- tp_search(...)
181 181
  if (simplify) {
182 -
    as.character(tmp$scientificname)
182 +
    as.character(tmp$ScientificName)
183 183
  } else{
184 184
    tmp
185 185
  }

@@ -152,7 +152,7 @@
Loading
152 152
      att <- "not found"
153 153
      mm <- FALSE
154 154
    } else {
155 -
      pageids <- tmp[grep(tolower(sci_com[i]), tolower(tmp$name)), "pageid"]
155 +
      pageids <- tmp$pageid[grep(tolower(sci_com[i]), tolower(tmp$name))]
156 156
157 157
      if (length(pageids) == 0) {
158 158
        if (nrow(tmp) > 0)

@@ -395,7 +395,7 @@
Loading
395 395
396 396
# Adapted from https://www.py4u.net/discuss/867198
397 397
recurse <- function (nested_list, func) {
398 -
  if (class(nested_list) == "data.frame" || ! is.list(nested_list)) {
398 +
  if ("data.frame" %in% class(nested_list) || ! is.list(nested_list)) {
399 399
    return(func(nested_list))
400 400
  } else {
401 401
    return(lapply(nested_list, recurse, func))

@@ -143,8 +143,8 @@
Loading
143 143
      mssg(messages, m_not_found_sp_altclass)
144 144
      att <- "not found"
145 145
    } else {
146 -
      df <- tmp[, c('nameid','scientificname','family','rankabbreviation',
147 -
                   'nomenclaturestatusname','author','displaydate')]
146 +
      df <- tmp[, c('NameId','ScientificName','Family','RankAbbreviation',
147 +
                   'NomenclatureStatusName','Author','DisplayDate')]
148 148
      names(df) <- c('tpsid','name','family','rank','status','author','date')
149 149
      id <- df$tpsid
150 150
      att <- "found"
Files Coverage
R 63.07%
Project Totals (131 files) 63.07%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading