# NOT RUN {
taxon_names <- c( "Westwodilla caecula" , "Abra alba", "Chaetozone cf. setosa", "Algae" )
w <- wormsbynames(taxon_names)
## print unrecognized returns
failed_species <- rownames(w[is.na(w[,1]),])
## try again with fuzzy matching turned on
# }
# NOT RUN {
w <- wormsbynames(taxon_names, match=TRUE)
# }
# NOT RUN {
## this is how to load taxon_names from file
write.csv(taxon_names , file = "tax.csv",
row.names = FALSE,
na = "")
## check it out, then load it
read.csv(file = "tax.csv",
na = "",
stringsAsFactors = FALSE,
col.names = FALSE)
## save results to file to inspect with, e.g. spreadsheet software
write.csv(w,file = "aphiainfo.csv",
na = "",
col.names = TRUE,
row.names = TRUE)
# }
Run the code above in your browser using DataCamp Workspace