Skip to content
New issue

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

modification of names with special character #91

Closed
sebdalgarno opened this issue Sep 11, 2019 · 2 comments · Fixed by #118
Closed

modification of names with special character #91

sebdalgarno opened this issue Sep 11, 2019 · 2 comments · Fixed by #118
Labels
Milestone

Comments

@sebdalgarno
Copy link

hi @ateucher I'm not sure if this behaviour is intended, but it caught me a bit off guard.

library(sf)
library(rmapshaper)
nc <- st_read(system.file(package = "sf", "shape/nc.shp"))
nc[["new name"]] <- 1
nc <- nc[, "new name"]

tmp <- ms_simplify(nc)

> names(nc)
[1] "new name" "geometry"
> names(tmp)
[1] "new.name" "geometry"
> 

Is it possible to leave the variable names as they were even if they have special characters?

@ateucher ateucher added the bug label Sep 11, 2019
@ateucher
Copy link
Owner

I think it should be possible, thanks for reporting this.

@ateucher ateucher added this to the 0.4.4 milestone Feb 28, 2020
@ateucher
Copy link
Owner

This should be fixed in ongoing work in #118

@ateucher ateucher linked a pull request Feb 28, 2022 that will close this issue
ateucher added a commit that referenced this issue Feb 28, 2022
ateucher added a commit that referenced this issue Apr 4, 2023
* Start experimenting with geojsonsf

* Fix tests

* Fix test

* Remove geo_list methods

* Change sp examples to sf

* Add geojsonsf, move geojsonio to Suggests

* document

* Remove test that just tests mapshaper

* Use rgdal directly to write sp to tempfile (no geojsonio)

* Define and use expect_equivalent_json to test geojson strings

* Fix tests and examples

* Document

* Make sure sf_to_GeoJSON always returns an FC

* No longer need to install Rcpp from source

* Add test helper to ignore df column order

* Clean up scratch folder

* Update DESCRIPTION

* use checkout@v2

* Simpler example

* change all proj -> crs

* Error in clip_erase when non-identical crs

* Methods for json rather than geo_json; also use jsonify::validate_json instead of geojsonlint

* Update min geojsonsf version and add Remotes to DESCRIPTION

* Don't support POSIXlt

* set test encoding

* remove last geojson method

* silence rgdal CRS warnings; remove geojsonio refs

* document

* Update NEWS

* namespace methods::slot

* test encoding with sf and sp

* Suppress crs assignment warning

* Add test for #91

* Temporarily use geojsonsf branch with encoding fix

* update encoding test for names and values

* Use PR for geojsonsf remote (windows encoding)

* Actions: Use ubuntu-gis-unstable ppa

* Tweaks to GH Actions

* Update CI

* Remove docker-based CI workflow

* CI: don't install spatial sysreqs since installing binaries from rspm

* Udpate imports versions, remove remote from geojsonsf

* Try new minimal CI workflow

* Use v2 actions

* Add old linux to test old v8

* Update gitignore

* CI: Change old Ubuntu from 16.04 to 18.04

* Edit R-CMD-check badge, render README

* documentation in apply_mapshaper_commands fixes #121

* Simplify cmd arg construction by setting NULL defaults

* Use ... to pass common args to apply_mapshaper_commands

* Add quiet parameter. Closes #125

* Add global sys_mem option

* document

* Use ... in clip & erase for common args

* documentation

* Add node mapshaper to CI

* typo

* Remove usages of rgdal and rgeos. Closes #129

* render readme and document

* Update GH actions

* Tweak news, build readme

* sp -> sf

---------

Co-authored-by: David Blodgett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants