Skip to content

ParallelLogger::saveSettingsToJson drops names when saving named vectors #18

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

Closed
jreps opened this issue Aug 16, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@jreps
Copy link

jreps commented Aug 16, 2022

see OHDSI/PatientLevelPrediction#305

reproducible example:

test <- c(1:10)
names(test) <- paste0('name_', 1:10)
ParallelLogger::saveSettingsToJson(test, file.path(getwd(), 'exampleJson.json'))

check the json and you will see there are no names

@schuemie schuemie added the bug Something isn't working label Sep 2, 2022
@schuemie
Copy link
Member

schuemie commented Nov 2, 2023

I think I agree with this post, arguing we shouldn't want to support named vectors. Instead, couldn't you use a data frame or list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants