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

preserve other classes when using setDT #2000

Open
mpavlis opened this issue Jan 23, 2017 · 1 comment
Open

preserve other classes when using setDT #2000

mpavlis opened this issue Jan 23, 2017 · 1 comment

Comments

@mpavlis
Copy link

mpavlis commented Jan 23, 2017

When I import a shapefile using the function st_read from the library sf I get an object of class sf and data.frame.

library(sf) 
 
library(data.table)  

polygon_data <- st_read("my_data.shp")

If I then use the function setDT to coerce it to data.table, the sf class is not preserved. Could it be possible for setDT to preserve other classes than data.frame when coercing an object?

@arunsrinivasan
Copy link
Member

This was the functionality before.. until #1078 and #1128 were reported.

I'm not so much in favour of adding an argument for this. Not sure what others think.

@jangorecki jangorecki changed the title [Request] preserve other classes when using setDT preserve other classes when using setDT Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants