From 91750c4b5c52f368a50b9c057c0df120922b2ee2 Mon Sep 17 00:00:00 2001 From: Cam Race <52536248+cjrace@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:22:45 +0100 Subject: [PATCH] write.csv() update Signed-off-by: Cam Race <52536248+cjrace@users.noreply.github.com> --- statistics-production/ud.qmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/statistics-production/ud.qmd b/statistics-production/ud.qmd index 30f4acc..341bf31 100644 --- a/statistics-production/ud.qmd +++ b/statistics-production/ud.qmd @@ -375,10 +375,10 @@ For saving results out of SQL as a .csv file there isn't an option to specify th **R** -When writing .csv files out of R, you'll mostly likely be using either `write.csv()` from base R, or `write_csv()` from the readr package. For the first one, you can specify encoding using `encoding = ` like the following example: +When writing .csv files out of R, you'll mostly likely be using either `write.csv()` from base R, or `write_csv()` from the readr package. For the first one, you can specify encoding using `fileEncoding = ` like the following example: -`write.csv(my_data, file = "my_data_file.csv", encoding = "UTF-8")` +`write.csv(my_data, file = "my_data_file.csv", fileEncoding = "UTF-8")` For `write_csv()`, which some of you may be using for increased processing speed, the function automatically encodes as UTF-8 format, meaning that you don't have to do anything different! @@ -1396,4 +1396,4 @@ For example, in tabulated form: | ethnicity_minor | ethnicity_major | Irish | White | | | | | ethnicity_minor | ethnicity_major | Arab | Other ethnic group | | | | -::: \ No newline at end of file +:::