[R-sig-Geo] gbif error message in package dismo

Éder Comunello comunello.eder at gmail.com
Sat May 16 16:53:49 CEST 2015


Hello, Mark!

I'm using R 3.1.3 and the error is slightly different. In my case I could
solve the problem with a manual conversion.

### <code r>

### The command works when you don't use the argument "sp=T"!
gb   <- gbif('Batrachoseps', 'luciae') # 1928

### The problem would be invalid coordinates in database...
gbif('Batrachoseps', 'luciae', geo=T, sp=T, download=F) # 1928
gb.sp  <- gbif('Batrachoseps', 'luciae', geo=T, sp=T) # Don't work!
# 0-300-600-900-1200-1500-1800-1928 records
# Error in na.fail.default(list(lon = c(-121.94704, -121.85457, -121.57892,
 :
#   missing values in object

### In fact, there are three invalid coordinates that could cause problem
in the sp conversion!
err  <- which(!complete.cases(cbind(gb$lon, gb$lat))) # [1]  647 1892 1894
gb[err, 1:5]

### But you can download the data and use a "manual" conversion...
### First eliminate the problem!
gb.sp <- gb[-err,] # 1925
coordinates(gb.sp) <- ~lon+lat
class(gb.sp) # [1] "SpatialPointsDataFrame"
plot(gb.sp)
### </code>

Éder Comunello <c <comunello.eder at gmail.com>omunello.eder at gmail.com>
Dourados, MS - [22 16.5'S, 54 49'W]

2015-05-16 6:48 GMT-04:00 Mark van Kleunen <mark.vankleunen at uni-konstanz.de>
:

> Hello,
>
> I am trying to use the gbif function to download GBIF records. Half a year
> ago, this function worked without any problems, but now I get an error
> message that I do not understand. I am using R3.2 for Windows and
> downloaded
> the latest dismo version. If I use the example syntax provided by ?gbif,
> the
> following error message appears.
>
>  gs <- gbif('Batrachoseps', 'luciae', sp=TRUE)
>>
>
> Loading required namespace: jsonlite
> 0-300-600-900-1200-1500-1800-1928 records
> Error in (function (classes, fdef, mtable)  :
>   unable to find an inherited method for function ‘bind’ for signature
> ‘"data.frame", "data.frame"’
>  A Google search for this error message did not reveal anything useful.
> Does
> anyone know how to solve this problem?
>
> best wishes,
> Mark
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list