We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have no idea why this is happening, please help. This is the dataset I'm using: https://api.gbif.org/v1/occurrence/download/request/0061636-241126133413365.zip
Here's my code:
# read data from file gbif_raw <- readData("../../BIOTA/GBIF/0061636-241126133413365.zip", quote = "", na.strings = c("", "NA")) gbif_raw <- gbif_raw[[1]] occs <- formatDwc(gbif_data = gbif_raw) occs <- formatOcc(occs)
And here's the error I'm getting:
Error in gsub(x, "", y, fixed = TRUE) : zero-length pattern
The text was updated successfully, but these errors were encountered:
Determined the problem is actually here:
occs$recordedBy.new <- fixName(occs$recordedBy) occs$recordedBy.aux <- prepName(occs$recordedBy.new, fix.names = FALSE, sep.out = "; ", output = "aux")
Sorry, something went wrong.
The error occurs in line 14 of lastName.R, when the input has a name starting with a comma. In my input I found the following:
> x[(grepl("^,",x))] [1] ", J.P. Souza, V.R. Scalon, G.O. Romao, M.I.R.G. Oliveira, A.L.F. Dutra"
I thought the name might have been split incorrectly but actually the input really does start with a comma AFTER a ; separating the first author
> gbif_raw$recordedBy[grepl(found, x)] [1] "Souza, V.C.; , J.P.Souza, V.R.Scalon, G.O.Romão, M.I.R.G.Oliveira, A.L.F.Dutra"
My suggestions are: add a safeguard (maybe a try) to skip errors, and remove any commas at the start of strings.
try
fixed LimaRAF#125
c3ad3b0
Fixing a small bug on the detection of multiple author separation (is…
a083501
…sues #125 and #126)
No branches or pull requests
I have no idea why this is happening, please help. This is the dataset I'm using: https://api.gbif.org/v1/occurrence/download/request/0061636-241126133413365.zip
Here's my code:
And here's the error I'm getting:
The text was updated successfully, but these errors were encountered: