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!
r utf-8
add a comment |
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!
r utf-8
2
rio::import()
(no captial I) just callsreadxl::read_excel()
for xlsx files. This isread_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 noencoding
parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search forr read_excel utf-8
– hrbrmstr
Nov 10 at 14:26
Yes i know theread_excel
function, but i didn't know that theimport
function just calls it. I will use this then, thank you.
– Larsg432
Nov 11 at 10:43
look at the R manual page forimport
. it lists all the functions that it dispatches the actual work to depending on file format.
– hrbrmstr
Nov 11 at 10:48
add a comment |
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!
r utf-8
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
r utf-8
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 callsreadxl::read_excel()
for xlsx files. This isread_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 noencoding
parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search forr read_excel utf-8
– hrbrmstr
Nov 10 at 14:26
Yes i know theread_excel
function, but i didn't know that theimport
function just calls it. I will use this then, thank you.
– Larsg432
Nov 11 at 10:43
look at the R manual page forimport
. it lists all the functions that it dispatches the actual work to depending on file format.
– hrbrmstr
Nov 11 at 10:48
add a comment |
2
rio::import()
(no captial I) just callsreadxl::read_excel()
for xlsx files. This isread_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 noencoding
parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search forr read_excel utf-8
– hrbrmstr
Nov 10 at 14:26
Yes i know theread_excel
function, but i didn't know that theimport
function just calls it. I will use this then, thank you.
– Larsg432
Nov 11 at 10:43
look at the R manual page forimport
. 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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
rio::import()
(no captial I) just callsreadxl::read_excel()
for xlsx files. This isread_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 noencoding
parameter. Take a look at github.com/tidyverse/readxl/issues/125 which was found via a search forr read_excel utf-8
– hrbrmstr
Nov 10 at 14:26
Yes i know the
read_excel
function, but i didn't know that theimport
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