Saturday, 15 September 2012

R encoding unable to save symbol -



R encoding unable to save symbol -

i working r script using rstudio (r version 2.15.3 on pc [for various reasons can't utilize more updated version or r]) , having problem saving script has parts per one thousand symbol in (‰). can’t share actual info have attached simple illustration below:

library(ggplot2) # gen random info <- data.frame(replicate(2,sample(1:10,500,rep=true))) # plot expressions axes labels basic <- ggplot(data = a, aes(x1, x2))+ geom_point()+ labs(list(colour="catch region", x=expression(paste(delta, ""^"13","c ","(‰)")), y=expression(paste(delta, ""^"15","n ","(‰)")))) basic

the graphed info in illustration nonsense regardless illustrates point, can see graph includes labels have ‰ symbol in them. upon saving script rstudio warring message:

not of characters in c:/… encoded using iso8859-1. save using different encoding, take "file | save encoding..." main menu.

rstudio has 12 different encoding types , have tried them all, each either gives no warring upon saving when script closed , reopened ‰ symbol gone, or gives same warring above next reload of script producing nonsense characters instead of ‰ symbol.

to date have been going through , changing symbol ‰ each time need reopen script, it’s becoming pain script library grows have each 1 open. help much appreciated.

also, realize there few other question on stackoverflow deal encoding issues nil have found far helps me specific issue.

use "file -> save encoding -> utf-8". unicode "superset" of encodings, handles code points can imagine. moreover, r unicode-aware.

r encoding symbol

No comments:

Post a Comment