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

dpasta support for sf objects? #121

Open
zackarno opened this issue May 22, 2021 · 1 comment
Open

dpasta support for sf objects? #121

zackarno opened this issue May 22, 2021 · 1 comment

Comments

@zackarno
Copy link

zackarno commented May 22, 2021

Hi Miles,

First, I am big fan of your work an this package!

I've recently stumbled into a case where I was doing some spatial data processes and realized I could only create the issue using my custom data. It was not easily reproducible using built-in data sets. Therefore, I greatly reduced and simplified my spatial data set, but couldn't get dput or dpasta to copy the data into code in a way that worked as it usually does with dataframes, tibbles, or other formats. The data was linestrings which I know would require a lot more code than many other formats, but I was wondering if a.) sf/spatial data is supported by datapasta, b.) if so, is there some documentation on the best practice for doing this, c.) if not, do you have any other suggestions on how to do this.

In the case describe above I ended up uploading the simplified linestring sf object to my post as a .rds file, but it would be cool to use datapasta if possible next time!

@MilesMcBain
Copy link
Owner

Hey,

Glad datapasta is working for you!

I think I usually use dput for this. It is really ugly but it gets the job done.

It's probably something I am unlikely to implement in datapasta. the tribble format just doesn't work well for things that aren't base data types. Even supporting dates is a challenge due to ways they continue to change in parsing upstream.

Miles

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