Skip to content

Commit 37f0a37

Browse files
committed
V 0.0.148 Cran recomentations #147, #148 and #149
1 parent 890de84 commit 37f0a37

10 files changed

Lines changed: 33 additions & 23 deletions

DESCRIPTION

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
Package: taxotools
22
Type: Package
33
Title: Taxonomic List Processing
4-
Version: 0.0.147
5-
Date: 2025-05-19
4+
Version: 0.0.148
5+
Date: 2025-05-23
66
Authors@R: c(
77
person("Vijay", "Barve", ,"vijay.barve@gmail.com", role = c("aut", "cre"),
88
comment = c(ORCID = "0000-0002-4852-2567")))
99
Maintainer: Vijay Barve <vijay.barve@gmail.com>
1010
Description: Taxonomic lists matching and merging, casting and melting
1111
scientific names, managing taxonomic lists from Global Biodiversity
12-
Information Facility 'GBIF' or Integrated Taxonomic Information System 'ITIS',
13-
harvesting names from Wikipedia and fuzzy matching.
12+
Information Facility 'GBIF' <https://www.gbif.org/> or Integrated Taxonomic
13+
Information System 'ITIS', <https://itis.gov/> harvesting names from
14+
Wikipedia and fuzzy matching.
1415
License: CC0
1516
Imports: taxize, wikitaxa, plyr, sqldf, stringr, stringdist, rmarkdown, stringi
1617
Encoding: UTF-8

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
taxotools 0.0.147
1+
taxotools 0.0.148
22
=================
33
* Bug fixes in melt_canonical, melt_scientificname, syn2taxo, get_synonym, resolve_names
44
* Function syn2taxo now carries order and family if present in original data

R/get_accepted_names.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ get_accepted_names <- function(namelist, master, gen_syn=NA, namelookup=NA,
168168
if("source" %in% names(master) ){
169169
master <- master[which(master$source %in% mastersource),]
170170
if(nrow(master)==0){
171-
cat("\nProblem matching mastersource")
171+
warning("\nProblem matching mastersource")
172172
return(NULL)
173173
}
174174
} else {
175-
cat("\nmaster data frame needs to have source column to use mastersource option")
175+
warning("\nmaster data frame needs to have source column to use mastersource option")
176176
return(NULL)
177177
}
178178
}

R/list_wiki_syn.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#' @importFrom wikitaxa wt_wikipedia
1515
#' @importFrom taxize gbif_parse
1616
#' @examples
17-
#' \dontrun{
18-
#' #list_wiki_syn("Abrothrix illutea")
19-
#' #list_wiki_syn(c("Abditomys latidens", "Abeomelomys sevia",
20-
#' # "Abrocoma schistacea"))
17+
#' \donttest{
18+
#' list_wiki_syn("Abrothrix illutea")
19+
#' list_wiki_syn(c("Abditomys latidens", "Abeomelomys sevia",
20+
#' "Abrocoma schistacea"))
2121
#' }
2222
#'
2323
#' @export

R/melt_scientificname.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ melt_scientificname <- function(dat,sciname="",genus="genus",
8989
words <- words[-1]
9090
next
9191
} else {
92-
cat(paste("\n Name: ",newdat$sciname[i]," is not well formated"))
92+
if(verbose){cat(paste("\n Name: ",newdat$sciname[i]," is not well formated"))}
9393
words <- words[-1]
9494
next
9595
}
@@ -151,7 +151,7 @@ melt_scientificname <- function(dat,sciname="",genus="genus",
151151
}
152152
setTxtProgressBar(pb,i)
153153
}
154-
cat("\n")
154+
if(verbose){cat("\n")}
155155
newdat <- rename_column(newdat,"genus_",genus)
156156
newdat <- rename_column(newdat,"species_",species)
157157
if(subspecies!=""){

R/syn2taxo.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#' @param synlist Synonym list with Accepted name (canonical) and Synonym columns
55
#' @param canonical Accepted names column name, Default: 'canonical'
66
#' @param synonym Synonym column name , Default: 'synonym'
7+
#' @param verbose verbose output on the console
78
#' @return returns a data frame in taxolist format with all the names in
89
#' canonical column and accepted names linked to synonyms using id and accid
910
#' fields. Order, family and (guessed) taxonlevel are added if missing. Genus,
@@ -33,7 +34,8 @@
3334
#' @export
3435
syn2taxo <- function(synlist,
3536
canonical="canonical",
36-
synonym="synonym"){
37+
synonym="synonym",
38+
verbose=FALSE){
3739
synlist <- rename_column(synlist,canonical,"Name_")
3840
synlist <- rename_column(synlist,synonym,"Syn_")
3941
# Accepeted Names
@@ -83,7 +85,7 @@ syn2taxo <- function(synlist,
8385
}
8486
setTxtProgressBar(pb,i)
8587
}
86-
cat("\n")
88+
if(verbose){cat("\n")}
8789
taxo <- melt_canonical(taxo,"canonical","genus","species","subspecies")
8890
taxo$Id <- as.numeric(taxo$Id)
8991
taxo$AccId <- as.numeric(taxo$AccId)

R/synonymize_subspecies.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ synonymize_subspecies <- function(master,
7878
master <- master[which(master$id %!in% remrec$id),]
7979
if(return_unmatched){
8080
if(nrow(remrec)==0){
81-
cat("\nNO Orphan subspecies\n")
81+
if(verbose){cat("\nNO Orphan subspecies\n")}
8282
return(NULL)
8383
} else {
84-
cat("\nReturning",nrow(remrec),"Orphan subspecies\n")
84+
if(verbose){cat("\nReturning",nrow(remrec),"Orphan subspecies\n")}
8585
return(remrec)
8686
}
8787
} else {

man/list_wiki_syn.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/syn2taxo.Rd

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/taxotools-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)