I am getting the unexpected input error in UI.R, as follows:
ERROR: C:\Users\myApp/ui.R:1:2: unexpected input
1: ï»
However, when I try to locate the error at line 1, there is absolutely nothing of the form ï»
.
To resolve this error, I tried saving my UI.R file as a text file and changing the encoding to UTF-8, but this still does not remove the strange character. I also tried removing the first couple of lines and re-writing the code, but it still gives the same error!
How can I remove this character? Should I use another text editor? I am using base R, not R Studio. And I had copy-pasted my code form my GitHub account, if that info is required... Code from my file can be viewed here.
Many thanks.
I have this same issue in the year '19, and took me a while to run into this question from the year '14.
Not Shiny, but a regular R project with its .Rprofile
.
The solution that worked for me is:
Open your file in Notepad++. From the Encoding menu, select Convert to UTF-8 (without BOM), save the file, replace the old file with this new file. And all is fixed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With