Skip to content

Commit 3752fd1

Browse files
committed
Cran version, change french unicode because windows developemnt version of R complains.
1 parent 1f73d92 commit 3752fd1

2 files changed

Lines changed: 55 additions & 20 deletions

File tree

CRAN-RELEASE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This package was submitted to CRAN on 2019-07-17.
2-
Once it is accepted, delete this file and tag the release (commit 619b9ab0ca).
1+
This package was submitted to CRAN on 2019-08-18.
2+
Once it is accepted, delete this file and tag the release (commit 1f73d92ef2).

R/cansim_helpers.R

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,58 @@ short_prov.en <- c(
117117
"Canada"="CAN"
118118
)
119119

120-
short_prov.fr <- c(
121-
"Colombie-Britannique"="BC",
122-
"Alberta"="AB",
123-
"Saskatchewan"="SK",
124-
"Manitoba"="MB",
125-
"Ontario"="ON",
126-
"Qu\u00E9bec"="QC",
127-
"Nouveau-Brunswick"="NB",
128-
"\u00CEle-du-Prince-\u00C9douard"="PE",
129-
"Nouvelle-\u00C9cosse"="NS",
130-
"Terre-Neuve-et-Labrador"="NL",
131-
"Yukon"="YT",
132-
"Territoires du Nord-Ouest"="NT",
133-
"Nunavut"="NU",
134-
"Territoires du Nord-Ouest incluant Nunavut"="NTNU",
135-
"Canada"="CAN"
136-
)
120+
# short_prov.fr <- c(
121+
# "Colombie-Britannique"="BC",
122+
# "Alberta"="AB",
123+
# "Saskatchewan"="SK",
124+
# "Manitoba"="MB",
125+
# "Ontario"="ON",
126+
# "Qu\U00E9bec"="QC",
127+
# "Nouveau-Brunswick"="NB",
128+
# "\u00CEle-du-Prince-\U00C9douard"="PE",
129+
# "Nouvelle-\U00C9cosse"="NS",
130+
# "Terre-Neuve-et-Labrador"="NL",
131+
# "Yukon"="YT",
132+
# "Territoires du Nord-Ouest"="NT",
133+
# "Nunavut"="NU",
134+
# "Territoires du Nord-Ouest incluant Nunavut"="NTNU",
135+
# "Canada"="CAN"
136+
# )
137+
138+
short_prov.fr <- purrr::set_names(c(
139+
"BC",
140+
"AB",
141+
"SK",
142+
"MB",
143+
"ON",
144+
"QC",
145+
"NB",
146+
"PE",
147+
"NS",
148+
"NL",
149+
"YT",
150+
"NT",
151+
"NU",
152+
"NTNU",
153+
"CAN"
154+
),c(
155+
"Colombie-Britannique",
156+
"Alberta",
157+
"Saskatchewan",
158+
"Manitoba",
159+
"Ontario",
160+
paste0("Qu",intToUtf8(0x00E9),"bec"),
161+
"Nouveau-Brunswick",
162+
paste0(intToUtf8(0x00CE),"le-du-Prince-",intToUtf8(0x00C9),"douard"),
163+
paste0("Nouvelle-",intToUtf8(0x00C9),"cosse"),
164+
"Terre-Neuve-et-Labrador",
165+
"Yukon",
166+
"Territoires du Nord-Ouest",
167+
"Nunavut",
168+
"Territoires du Nord-Ouest incluant Nunavut",
169+
"Canada"
170+
))
171+
137172

138173

139174
#' Add provincial abbreviations as factor
@@ -146,7 +181,7 @@ add_provincial_abbreviations <- function(data){
146181
data_geography_column <- "GEO"
147182
short_prov <- short_prov.en
148183
} else {
149-
data_geography_column <- paste0("G\u00C9O")
184+
data_geography_column <- paste0("G",intToUtf8(0x00C9),"O")
150185
short_prov <- short_prov.fr
151186
}
152187
data <- data %>%

0 commit comments

Comments
 (0)