How to build 32-bit Unicode characters? R 3.2.2 freezes on Windows / RStudio

How can I draw unicode characters like ๐Ÿšบ WOMENS SYMBOL or ๐Ÿšน MENS SYMBOL or other characters from this code block? Besides installing the font family that contains these characters, R hangs on my system * when using the pch dot character as follows:

 plot(0, type="n") points(1, .5, pch=-0xfffdL) # works points(1, -.5, pch=-0x1f6b9L) # R hangs 

Like doc states ,

Where the OS is supported, negative values โ€‹โ€‹indicate the Unicode code, for example, -0x2642L is the male character, and -0x20ACL is the euro.

* My sessionInfo() :

 R version 3.2.2 (2015-08-14) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252 LC_NUMERIC=C [5] LC_TIME=German_Germany.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] rsconnect_0.3.79 tools_3.2.2 

Thanks for the help and check in your system in advance.


Edit: Windows freezes when I use RStudio 0.99.879 with an RStudio graphics device. If I explicitly use dev.new(noRStudioGD=T) , then I get a smiliar error, as mentioned in the comments: "Error in plot.xy (xy.coords (x, y), type = type, ...): Invalid input of 'รฐลธลกยน' into 'utf8towcs'. For now, I will use the PNG backup option, as described in article 42.

+6
source share
1 answer

I have no answer, but in the png format there are some publicly available versions:

enter image description here enter image description here

You must be able to compress and print them in the required places: using custom images instead of standard shapes for line chart markers R

 library(png) img <- readPNG('~/Downloads/mens_room_clip_art_9332/Mens_Room_clip_art_small.png') str(img) # num [1:100, 1:100, 1:4] 1 1 1 1 1 1 1 0 0 0 ... require(grid) #Loading required package: grid male <- rasterGrob(img) img <- readPNG('~/Downloads/ladies_room_clip_art_16926/Ladies_Room_clip_art_small.png') female <- rasterGrob(img) df = data.frame(x=rep(1:4,2), y=c(1,1,2,4,6.5,5,5.5,4.8), g=rep(c("s","m"),each=4)) p = ggplot(df, aes(x, y, group=g)) + geom_line() + theme_bw() a=0.2 for (i in rownames(df[df$g=="s",])) { p = p + annotation_custom(male, df[i,"x"]-a,df[i,"x"]+a,df[i,"y"]-a,df[i,"y"]+a) } b=0.2 for (i in rownames(df[df$g=="m",])) { p = p + annotation_custom(female, df[i,"x"]-b,df[i,"x"]+b,df[i,"y"]-b,df[i,"y"]+b) } png();print(p);dev.off() 

enter image description here

I also took the images and pasted them into Gimp and scaled to 24 pixels:

enter image description here enter image description here

+2
source

All Articles