Comments (4)
Grrrr! Well spotted! (Partially) fixed in 1.13 (see below) - the result for multiple unmatched names is now an empty data frame (the same as it is for a single unmatched name). But I think it would be more consistent for this to be a data frame with at least the column names "searchTerm","name","commonName","rank","guid" (i.e. the core set that is present in the result for a matched name).
> search_names("fljkhdlsi")
<0 x 0 matrix>
> search_names(c("fljkhdlsi","lfajldlo"))
<0 x 0 matrix>
> search_names(c("Grevillea"))
searchTerm name commonName rank guid
1 "Grevillea" "Grevillea" "Grevillea, Spider Flower" "genus" "urn:lsid:biodiversity.org.au:apni.taxon:378603"
> search_names(c("Grevillea","k.jkasdfou"))
searchTerm name commonName rank guid
1 "Grevillea" "Grevillea" "Grevillea, Spider Flower" "genus" "urn:lsid:biodiversity.org.au:apni.taxon:378603"
2 "k.jkasdfou" NA NA NA NA
> search_names(c("Grevillea","Macropus","fksdjhfui"))
searchTerm name commonName rank guid
1 "Grevillea" "Grevillea" "Grevillea, Spider Flower" "genus" "urn:lsid:biodiversity.org.au:apni.taxon:378603"
2 "Macropus" "Macropus" NA "genus" "urn:lsid:biodiversity.org.au:afd.taxon:9e6a0bba-de5b-4465-8544-aa8fe3943fab"
3 "fksdjhfui" NA NA NA NA
from ala4r.
Great - thanks. I agree, returning a data.frame with searchTerm filled and other columns NA (as per row 3 of your last example above) would be sensible.
from ala4r.
PS The
<0 x 0 matrix>
output comes from the print function for that class, which coerces to a matrix before printing. But I think that's unhelpfully misleading ...
from ala4r.
Fixed in v1.14. All-unmatched names should now return an NA-populated data.frame or list (when guids_only=TRUE) rather than an empty one. Print method also tweaked slightly.
from ala4r.
Related Issues (20)
- Make package skeleton HOT 1
- Change Macropus genus in example HOT 1
- Google analytics
- Document API dependencies HOT 2
- Case study - Latitudonal gradient analysis HOT 1
- Case study - area report HOT 1
- Case study - text mining Darwin Core terms HOT 1
- Develop ALA4R training materials
- sites_by_species can fail on valid WKT
- ala_list() test failing HOT 1
- ALA4R Travis build failing
- problem accessing records using occurrences() HOT 6
- Sites by species failing while waiting for task to complete
- Make use of new image web service
- Generate DOIs for downloads HOT 1
- Publish to CRAN - v 1.8.0 HOT 1
- Retrieve data resource information
- Implement facet search
- Include data quality filters in ala_occurrences
- Progress bar for downloads, or an initial count on how many records to expect HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ala4r.