ateucher / rmapshaper

An R wrapper for the mapshaper javascript library
http://andyteucher.ca/rmapshaper/
Other
200 stars 13 forks source link

Dissolve by field - How #127

Closed BeaMo closed 1 year ago

BeaMo commented 1 year ago

Hi there,

I am trying to run a ms_dissolve using a column as the field it runs into an issue while doing that. "Error in V8 context: UserError: [dissolve] Command expects a single value."

Am I misunderstanding the 'field' option? Would be awesome if you can help me.

Cheers.

ateucher commented 1 year ago

Hi @BeaMo - apologies for the delay. The field argument takes a character vector of length one or more specifying the column(s) on which to dissolve. Did you provide a bare variable name (eg., var1) instead of a character string ("var1")?

BeaMo commented 1 year ago

Hi Andy, thanks for your reply anyway. I solved this issue :) It was a memory issue from my side. Next issue I am facing though is using ms_erase Although the ms_erase works. I am not able to continue working with the created variable.

Basically: a<-ms_erase(target = b, erase = c) d<-ms_erase(target = e, erase = a)

Cannot allocate vector of allocated size 54 mb is the error message.

ateucher commented 1 year ago

Try using sys = TRUE and playing with the sys_mem argument. You'll need to install nodejs and the mapshaper node library.

ateucher commented 1 year ago

Closing this now, please reopen if you're still having this problem.