在R数据帧中使用外来字符

在R数据帧中使用外来字符,r,dataframe,character-encoding,hebrew,R,Dataframe,Character Encoding,Hebrew,我试图将一些数据(csv文件)导入R,但它是希伯来文的,不幸的是,文本被转换成了这样的格式,例如:™׳“׳” ׳₪׳¡׳™׳›׳™׳׳˜׳¨׳™׳” ׳׳ ׳¢׳¦׳׳׳™ 43.61 3 ׳™׳¢׳¨׳™ ׳׳‘׳™׳‘ ׳₪׳¡׳™׳›׳™׳׳˜׳¨׳™׳” ׳׳ ׳¢׳¦׳׳׳™ 45 4 ׳׳’׳¨׳‘ ׳׳ ׳˜׳•׳ ׳₪׳¡׳™׳›׳™׳׳˜׳¨׳™׳ 我能做些什么来保存希伯来文?谢谢:)要阅读包含希伯来文字符的csv文件,您可以使用readr软件包,它是

我试图将一些数据(csv文件)导入R,但它是希伯来文的,不幸的是,文本被转换成了这样的格式,例如:™׳“׳” ׳₪׳¡׳™׳›׳™׳׳˜׳¨׳™׳” ׳׳ ׳¢׳¦׳׳׳™ 43.61 3 ׳™׳¢׳¨׳™ ׳׳‘׳™׳‘ ׳₪׳¡׳™׳›׳™׳׳˜׳¨׳™׳” ׳׳ ׳¢׳¦׳׳׳™ 45 4 ׳׳’׳¨׳‘ ׳׳ ׳˜׳•׳ ׳₪׳¡׳™׳›׳™׳׳˜׳¨׳™׳


我能做些什么来保存希伯来文?谢谢:)

要阅读包含希伯来文字符的csv文件,您可以使用
readr
软件包,它是
tidyverse
软件包的一部分。这个包有很多用于语言编码和本地化的实用程序,比如
guess\u编码
locale
。 请尝试以下代码:

install.packages("tidyverse")
library(readr)
locale("he")
guess_encoding(file = "path_to_your_file", n_max = 10000, threshold = 0.2) //replace with your data
df <- read_csv(file = "path_to_your_file", locale = locale(date_names = "he", encoding = "UTF-8")) //replace with your data
install.packages(“tidyverse”)
图书馆(readr)
地点(“他”)
guess_encoding(file=“path_to_your_file”,n_max=10000,threshold=0.2)//替换为您的数据

df要读取带有希伯来文字符的csv文件,可以使用
readr
包,它是
tidyverse
包的一部分。这个包有很多用于语言编码和本地化的实用程序,比如
guess\u编码
locale
。 请尝试以下代码:

install.packages("tidyverse")
library(readr)
locale("he")
guess_encoding(file = "path_to_your_file", n_max = 10000, threshold = 0.2) //replace with your data
df <- read_csv(file = "path_to_your_file", locale = locale(date_names = "he", encoding = "UTF-8")) //replace with your data
install.packages(“tidyverse”)
图书馆(readr)
地点(“他”)
guess_encoding(file=“path_to_your_file”,n_max=10000,threshold=0.2)//替换为您的数据
df