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

update scenarios SSP3, SSP2 #279

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

ahagen-pik
Copy link
Contributor

@ahagen-pik ahagen-pik commented Sep 17, 2024

fixes format of numerics, separators, etc. for input files dependent on the scenario

to write data.table dt in this format use:

numeric_cols <- sapply(dt, is.numeric)
dt[, (names(dt)[numeric_cols]) := lapply(.SD, function(x) formatC(x, format = "G")), .SDcols = numeric_cols]
write.table(dt, system.file("your/file.csv", package = "edgeTransport", mustWork = TRUE), 
            na = "", row.names = FALSE, quote = FALSE, sep = ";", dec = ".")

This PR is connected to PR#547 in mrremind

@ahagen-pik ahagen-pik changed the title fix formatting for scenario input files update scenarios SSP3, SSP2 Sep 17, 2024
@ahagen-pik ahagen-pik merged commit 088b004 into pik-piam:master Sep 18, 2024
2 checks passed
@ahagen-pik ahagen-pik deleted the updateScenarios branch September 20, 2024 08:51
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.

3 participants