Skip to content

Commit

Permalink
Escape CSV.
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBlissett committed Jul 15, 2024
1 parent 2112f8c commit 25ad82f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-table-script/R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mutate(`Occurrence records` = trimws(format(`Occurrence records`, nsmall=0, big.
mutate(`Data citations` = trimws(format(`Data citations`, nsmall=0, big.mark="\u202F"),which ="left")) %>%
mutate(`Activity sector` = paste0("{",`Activity sector`,"}")) %>%
mutate(`Country` = paste0("{",`Country`,"}")) %>%
write.table(file = "250-private-sector-table.csv", row.names = FALSE, col.names = FALSE, sep = ",", quote = FALSE)
write.csv(file = "250-private-sector-table.csv", row.names = FALSE, col.names = FALSE)

# totals table
tt %>%
Expand All @@ -78,4 +78,4 @@ Datasets = sum(Datasets),
mutate(`Datasets` = trimws(format(`Datasets`, nsmall=0, big.mark="\u202F"),which ="left")) %>%
mutate(`Occurrence records` = trimws(format(`Occurrence records`, nsmall=0, big.mark="\u202F"),which ="left")) %>%
mutate(`Data citations` = trimws(format(`Data citations`, nsmall=0, big.mark="\u202F"),which ="left")) %>%
write.table(file = "260-private-sector-totals.csv", row.names = FALSE, col.names = FALSE, sep = ",", quote = FALSE)
write.csv(file = "260-private-sector-totals.csv", row.names = FALSE, col.names = FALSE)

0 comments on commit 25ad82f

Please sign in to comment.