Use encoding=“UTF-8” in rio









up vote
0
down vote

favorite












Some of my students got an issue yesterday. I tried to solve it with some code examples from Stackoverflow, but none of them worked for me.



I tried to import an .xlsx file and some of the characters like "ü" got replaced by "". It seems that this is an encoding problem, so I tried the following:



library(rio) 
df <- import("example.xlsx",encoding = "UTF-8", na="...")


R throws back this error:



unused argument (encoding = "UTF-8 ")


I have to use the Rio package! So does anybody has a solution for my problem?
It seems that this problem mostly appears on Mac computers with OSX.



I really appreciate your help, thanks a lot!










share|improve this question



















  • 2




    rio::import() (no captial I) just calls readxl::read_excel() for xlsx files. This is read_excel()'s signature: read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, col_types = NULL, na = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max)). It has no encoding parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search for r read_excel utf-8
    – hrbrmstr
    Nov 10 at 14:26











  • Yes i know the read_excel function, but i didn't know that the import function just calls it. I will use this then, thank you.
    – Larsg432
    Nov 11 at 10:43










  • look at the R manual page for import. it lists all the functions that it dispatches the actual work to depending on file format.
    – hrbrmstr
    Nov 11 at 10:48














up vote
0
down vote

favorite












Some of my students got an issue yesterday. I tried to solve it with some code examples from Stackoverflow, but none of them worked for me.



I tried to import an .xlsx file and some of the characters like "ü" got replaced by "". It seems that this is an encoding problem, so I tried the following:



library(rio) 
df <- import("example.xlsx",encoding = "UTF-8", na="...")


R throws back this error:



unused argument (encoding = "UTF-8 ")


I have to use the Rio package! So does anybody has a solution for my problem?
It seems that this problem mostly appears on Mac computers with OSX.



I really appreciate your help, thanks a lot!










share|improve this question



















  • 2




    rio::import() (no captial I) just calls readxl::read_excel() for xlsx files. This is read_excel()'s signature: read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, col_types = NULL, na = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max)). It has no encoding parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search for r read_excel utf-8
    – hrbrmstr
    Nov 10 at 14:26











  • Yes i know the read_excel function, but i didn't know that the import function just calls it. I will use this then, thank you.
    – Larsg432
    Nov 11 at 10:43










  • look at the R manual page for import. it lists all the functions that it dispatches the actual work to depending on file format.
    – hrbrmstr
    Nov 11 at 10:48












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Some of my students got an issue yesterday. I tried to solve it with some code examples from Stackoverflow, but none of them worked for me.



I tried to import an .xlsx file and some of the characters like "ü" got replaced by "". It seems that this is an encoding problem, so I tried the following:



library(rio) 
df <- import("example.xlsx",encoding = "UTF-8", na="...")


R throws back this error:



unused argument (encoding = "UTF-8 ")


I have to use the Rio package! So does anybody has a solution for my problem?
It seems that this problem mostly appears on Mac computers with OSX.



I really appreciate your help, thanks a lot!










share|improve this question















Some of my students got an issue yesterday. I tried to solve it with some code examples from Stackoverflow, but none of them worked for me.



I tried to import an .xlsx file and some of the characters like "ü" got replaced by "". It seems that this is an encoding problem, so I tried the following:



library(rio) 
df <- import("example.xlsx",encoding = "UTF-8", na="...")


R throws back this error:



unused argument (encoding = "UTF-8 ")


I have to use the Rio package! So does anybody has a solution for my problem?
It seems that this problem mostly appears on Mac computers with OSX.



I really appreciate your help, thanks a lot!







r utf-8






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 17:01









kit

520113




520113










asked Nov 10 at 14:10









Larsg432

585




585







  • 2




    rio::import() (no captial I) just calls readxl::read_excel() for xlsx files. This is read_excel()'s signature: read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, col_types = NULL, na = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max)). It has no encoding parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search for r read_excel utf-8
    – hrbrmstr
    Nov 10 at 14:26











  • Yes i know the read_excel function, but i didn't know that the import function just calls it. I will use this then, thank you.
    – Larsg432
    Nov 11 at 10:43










  • look at the R manual page for import. it lists all the functions that it dispatches the actual work to depending on file format.
    – hrbrmstr
    Nov 11 at 10:48












  • 2




    rio::import() (no captial I) just calls readxl::read_excel() for xlsx files. This is read_excel()'s signature: read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, col_types = NULL, na = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max)). It has no encoding parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search for r read_excel utf-8
    – hrbrmstr
    Nov 10 at 14:26











  • Yes i know the read_excel function, but i didn't know that the import function just calls it. I will use this then, thank you.
    – Larsg432
    Nov 11 at 10:43










  • look at the R manual page for import. it lists all the functions that it dispatches the actual work to depending on file format.
    – hrbrmstr
    Nov 11 at 10:48







2




2




rio::import() (no captial I) just calls readxl::read_excel() for xlsx files. This is read_excel()'s signature: read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, col_types = NULL, na = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max)). It has no encoding parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search for r read_excel utf-8
– hrbrmstr
Nov 10 at 14:26





rio::import() (no captial I) just calls readxl::read_excel() for xlsx files. This is read_excel()'s signature: read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, col_types = NULL, na = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max)). It has no encoding parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search for r read_excel utf-8
– hrbrmstr
Nov 10 at 14:26













Yes i know the read_excel function, but i didn't know that the import function just calls it. I will use this then, thank you.
– Larsg432
Nov 11 at 10:43




Yes i know the read_excel function, but i didn't know that the import function just calls it. I will use this then, thank you.
– Larsg432
Nov 11 at 10:43












look at the R manual page for import. it lists all the functions that it dispatches the actual work to depending on file format.
– hrbrmstr
Nov 11 at 10:48




look at the R manual page for import. it lists all the functions that it dispatches the actual work to depending on file format.
– hrbrmstr
Nov 11 at 10:48

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239782%2fuse-encoding-utf-8-in-rio%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239782%2fuse-encoding-utf-8-in-rio%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

政党

天津地下鉄3号線