Reputation: 89
I am writing a program on R studio
. My program runs well on R studio
but, when I try to run it using .bat
command, it gives me the following error:
Error in file(filename, "r", encoding = encoding) : unsupported conversion from 'CP1,254' to '' Calls: runApp ... sourceUTF8 -> eval -> eval -> ..stacktraceon.. -> source -> file Execution halted
The whole run.r.Rout
file can be found below :
> require(shiny)
Loading required package: shiny
> folder_address = '~//app_v2'
> runApp(folder_address, launch.browser = TRUE)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Warning: package 'lubridate' was built under R version 3.4.4
Attaching package: 'lubridate'
The following object is masked from 'package:base':
date
Error in file(filename, "r", encoding = encoding) :
unsupported conversion from 'CP1,254' to ''
Calls: runApp ... sourceUTF8 -> eval -> eval -> ..stacktraceon.. -> source -> file
Execution halted
Am I missing anything here? The solution must be simple but I just cannot figure it out. Could this be related to lubridate
package usage? Again, my program runs well on R studio, but giving error when I run it on the terminal.
Any help will be appreciated. Thanks in advance.
Upvotes: 0
Views: 217
Reputation: 44838
It looks as though some part of the code thinks your current file encoding is "CP1,254"
, which isn't a real encoding. You can see the full list of encodings that R knows about using iconvlist()
. On my system, that includes "CP1254"
,
i.e. "code page 1254", used on Windows in a Turkish locale.
So you'll need to figure out where that comma came from. Maybe some code queries the code page, and inserts a formatC
-style big.mark
?
Upvotes: 1