0

In one of the datasets I am using in a .Rmd file includes a Norwegian character (å). When I try to "build the book" I am getting the following error message:

Quitting from lines 89-91 (05-visualisering.Rmd) 
Error in FUN(X[[i]], ...) : object '�r' not found
Calls: local ... <Anonymous> -> f -> scales_add_defaults -> lapply -> FUN
Execution halted
Error in Rscript_render(f, render_args, render_meta) : 
  Failed to compile 05-visualisering.Rmd
Calls: <Anonymous> ... render_book -> render_new_session -> Rscript_render
Execution halted

Exited with status 1.

How can I solve this issue?

  • 1
    I can render this just fine in an Rmd. I think your problem is with one of the functions you are calling withing the book. Maybe a font issue with `ggplot2`? You will have to share more code to get help. Best would be a [reproducible example](http://stackoverflow.com/questions/5963269). I assume a normal RMardown document would be enough. – JBGruber Oct 24 '19 at 10:01
  • ggplot(nyeStudenter, aes(x=år, y=studenter)) creates the error message – user10904839 Oct 24 '19 at 10:17
  • 1
    There you go. Just replace your variable name with a standard latin character. If that's not what you want, you should update the question since it's not a bookdown problem then. Or is it? – JBGruber Oct 24 '19 at 10:19
  • When I ask for the names of the variables in the dataset 'nyeStudenter', I am getting the following names > names(nyeStudenter) [1] "kjønn" "alder" "Ã¥r" "studenter" – user10904839 Oct 24 '19 at 10:21
  • 1
    It would really be easier if you'd share a reproducible example... – JBGruber Oct 24 '19 at 10:23
  • You are right, this does not seem to be a bookdown problem. – user10904839 Oct 24 '19 at 10:24
  • 2
    If you don't want to change the Norwegian characters, you could try this approach: https://stackoverflow.com/a/47077037/5028841 – JBGruber Oct 24 '19 at 10:27

0 Answers0