Options

R extension console fails where RGUI works fine.

flash_usflash_us Member Posts: 1 Contributor I
edited November 2018 in Help
Hello,

I've got an issue with R extension for rapidminer, that maybe related to encoding.
I am running following script to obtain Sberbank stock quotes from Finam.ru.

library(rusquant)
library(TTR)
library(PerformanceAnalytics)
setInternet2(TRUE)

# Parameters
SymbolName="SBER"
initDate="2003-01-01"
secondDate="2006-01-01::"

# pull stock data from Finam.ru
symbol<-getSymbols(SymbolName,from=initDate, src="Finam")
stock<-xts(get(symbol))
It runs perfect in RGUI, but in R console in RapidMiner I get the following error:

Error in read.table(file = file, header = header, sep = sep, quote = quote,  :
  empty beginning of file
In addition: Warning messages:
1: In readLines(con = tmp, warn = FALSE) :
  invalid input found on input connection 'C:\Users\ILYA~1.DYA\AppData\Local\Temp\RtmpM9Gfqp\file3d387156'
2: In download.file(stock.URL, destfile = tmp, quiet = !verbose) :
  downloaded length 52 != reported length 200
3: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  invalid input found on input connection 'C:\Users\ILYA~1.DYA\AppData\Local\Temp\RtmpM9Gfqp\file18c42081'
4: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  incomplete final line found by readTableHeader on 'C:\Users\ILYA~1.DYA\AppData\Local\Temp\RtmpM9Gfqp\file18c42081'
Error in get(symbol) : object 'symbol' not found"
Also, when locale is set in russian, I see strange symbols instead of cyrillic letters in R rapidminer console, in RGUI all fine.
Could anybody please help?

Thanks a bunch,
Ilya
Sign In or Register to comment.