Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在R 3.5.3.2中以从右到左的语言查看标签_R_Ggplot2_Shiny - Fatal编程技术网

在R 3.5.3.2中以从右到左的语言查看标签

在R 3.5.3.2中以从右到左的语言查看标签,r,ggplot2,shiny,R,Ggplot2,Shiny,我使用的是R3.5.3和Shining 1.2.0,我需要查看带有希伯来语标签的“ggplot2”图形 由于某种原因,希伯来语的标签看起来是颠倒的 在以前版本的R中,它从未发生过 这是我的代码: ggplot(temp,aes(x=Phrase,y=Freq))+scale_x_discrete(labels = function(x) lapply(strwrap(x, width = 25, simplify = FALSE), paste, collapse="\n"),limits =

我使用的是R3.5.3和Shining 1.2.0,我需要查看带有希伯来语标签的“ggplot2”图形

由于某种原因,希伯来语的标签看起来是颠倒的

在以前版本的R中,它从未发生过

这是我的代码:

ggplot(temp,aes(x=Phrase,y=Freq))+scale_x_discrete(labels = function(x) 
lapply(strwrap(x, width = 25, simplify = FALSE), paste, collapse="\n"),limits = temp$Phrase[order(temp$Freq)])+
geom_bar(color="darkblue", fill="lightblue",stat="identity")+ coord_flip()
有办法解决吗


关于

我遇到了这个问题,因为我看到了同样的事情。 我所做的是手动反转标签:

heb_label <- "אני"
splits <- strsplit(heb_label, "")[[1]]
reversed <- rev(splits)
final_heb_label <- paste(reversed, collapse = "")

heb_label我遇到了这个问题,因为我看到了同样的事情。
我所做的是手动反转标签:

heb_label <- "אני"
splits <- strsplit(heb_label, "")[[1]]
reversed <- rev(splits)
final_heb_label <- paste(reversed, collapse = "")
heb_标签