Hello,
When I load csv files into a dataframe, it happens that the a header of a column shows strange characters, e.g.: ï.. as in 'ï..profScore'
My statistics instructor thought it might be a language setting issue. What we checked in R Studio on my laptop is:
Sys.setlocale()
[1] "LC_COLLATE=German_Switzerland.1252;LC_CTYPE=German_Switzerland.1252;LC_MONETARY=German_Switzerland.1252;LC_NUMERIC=C;LC_TIME=German_Switzerland.1252"
We changed that with:
Sys.setlocale("LC_ALL","English")
[1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
But the problem persists. And when I close and restart R Studio, the settings are back to German_Switzerland again. How could I fix that permanently to English or LANG = "en_US.UTF-8"?
If the issue with the strange characters is not related to language settings, what else could cause this problem? And how could I fix that?
And finally, I cannot draw a bar graph (perhaps this problem is related to the issues mentioned above, that's why I'm mentioning it here as well).
I load a csv file into a dataframe:
df <- read.csv("swahili.csv")
The commands for the graph:
bar <- ggplot(df, aes(Group, ï..profScore))
bar + stat_summary(fun = mean, geom = "bar", fill = "White", colour = "Black")
The stat_summary causes the problem. R Studio throws the following error message:
Warning message:
Computation failed in stat_summary()
:
Can't convert a double vector to function
Why do I get this error message? How can I fix this?
I would appreciate any help.
Thanks!
Best, Andreas