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

Remove coerce to numeric from read_api #250

Merged
merged 2 commits into from
Jun 9, 2024
Merged

Remove coerce to numeric from read_api #250

merged 2 commits into from
Jun 9, 2024

Conversation

kletts
Copy link
Contributor

@kletts kletts commented Jun 4, 2024

Hi Matt,
Here's a pull request to update the code to address the issue #249.
I found that the source of the coercion was actually upstream in the initial read of the CSV in which the R function read.csv when column classes are not specific defaults to guessing.
Having adjusted the import of the CSV as character, the labelling function now attempts to coerce only the non-code columns as discussed in the issue.
Christian

Christian Klettner added 2 commits June 5, 2024 08:55
…aw read to class character and attempts to convert any column not in a codelits to numeric
@MattCowgill
Copy link
Owner

Closes #249

@MattCowgill MattCowgill changed the base branch from master to dont_coerce_numeric_apidata June 9, 2024 06:16
@MattCowgill
Copy link
Owner

Thanks so much @kletts

@MattCowgill MattCowgill merged commit 9ddfc33 into MattCowgill:dont_coerce_numeric_apidata Jun 9, 2024
4 checks passed
MattCowgill added a commit that referenced this pull request Jun 9, 2024
* Remove coerce to numeric from read_api (#250)

* column class treatment defaults for reading codelists: defaults the raw read to class character and attempts to convert any column not in a codelits to numeric

* removed testing file

---------

Co-authored-by: Christian Klettner <[email protected]>

* iterate version

* don't retain commented out code chunks

* run styler::style_pkg()

---------

Co-authored-by: Christian Klettner <[email protected]>
Co-authored-by: Christian Klettner <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants