When I am trying to compile a report from my r script, I get a message starting with the following:
"Error in parse(text = x, srcfile = src) : :10:0: unexpected end of input 8: 9: --- ^ Calls: ... -> parse_all -> parse_all.character -> parse In addition: Warning messages: 1: In read_utf8(hair) : The file gr- 3- "file.name.R" is not encoded in UTF-8."
How do I fix this? Seems to be UTF-8 thats the issue, not even sure what that means to be honest...
There are two problems. The unexpected end likely can be fixed by editing the file being read to add a newline so that it ends in a blank line.
The second, unrelated, problem is that the eventual output will not display correctly if there are characters such as акцентированный. One way to fix is to open the file in RStudio (File|Open from the menu) and File|Save with encoding