Problems with German Umlaut in RStudio (Windows 7)

I have problems using Umlauts in Rstudio. First, the CSV file is read like this:

mydat<-read.csv("c:/mydat.csv", 
                   header=F, 
                   sep=";", 
                   na.strings= c("NA",""))

      

When I open mydat dataframe everything seems to go fine:

enter image description here

But when I use R-Console the Umlauts are gone:

levels(mydat$V6)
[1] "Öfter als Fünfmal" "Einmal" "Zwei- bis Fünfmal" 

      

I tried using read.table

as well encoding="windows-1252"

, but didn't change anything. Everything works fine on my Mac.

Here is my system. Maybe there is a simple solution and I'm just dumb like every time I asked a question on stackoverflow.

Sys.getlocale()
[1] "LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252"

R.version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          1.3                         
year           2015                        
month          03                          
day            09                          
svn rev        67962                       
language       R                           
version.string R version 3.1.3 (2015-03-09)
nickname       Smooth Sidewalk  

      

+3


source to share





All Articles