iobis / obistools

Tools for data enhancement and quality control
https://iobis.github.io/obistools
Other
25 stars 6 forks source link

identify_map error #62

Open pieterprovoost opened 6 years ago

pieterprovoost commented 6 years ago
Error: nrow(coords) > 0 is not TRUE In addition: Warning messages: 1: 'identify_map' is deprecated. See help("Deprecated") 2: In identify_map(PointsOnLand) :   This function returns incorrect results in some versions of RStudio
Daphnisd commented 6 years ago

Identify_map is depricated? I now get the following error: "Error: nrow(coords) > 0 is not TRUE"

samuelbosch commented 6 years ago

There were/are some serious issues with identify_map in some versions of RStudio which I can't work around but these were/are related to the function returning incorrect results. The easiest way to do something similar as identify map is using the leaflet map with labels and then clicking on the points. If this is not sufficient, I can try to see where this error comes from and whether the RStudio issue has been fixed in the mean time.

# plot points with info on first 5 columns
plot_map_leaflet(data, colnames(data)[1:5])
Daphnisd commented 6 years ago

On my pc that code doesn't work (I get an all grey viewer).

The identify map was a cool feature as it stores the data in a table. But the buffer option of check_onland is sufficient for the dataset I'm working on now.

samuelbosch commented 6 years ago

I've just checked identify_map with the latest RStudio on my mac and I'm still experiencing the same issues as before so I wouldn't rely on it.

I've improved the popup of the plot_leaflet_map (latest version on GitHub):

plot_map_leaflet(abra, popup = head(colnames(abra)))
Daphnisd commented 6 years ago

Hi, I tried the pup-up code. I get: "Input to asJSON(keep_vec_names=TRUE) is a named vector. In a future version of jsonlite, this option will not be supported, and named vectors will be translated into arrays instead of objects. If you want JSON object output, please use a named list instead. See ?toJSON."

I tried running "install.packages("jsonlite")", but that didn't help

samuelbosch commented 6 years ago

Hi Daphnis,

This is a warning in the leaflet library that I can't fix so you don't have to pay attention to it.