I wrote a Little program to import MSCI World Data (which I can't find on yahoo finance) via OnVista:
library(fImport)
library(fBasiscs)
notation="3193857"
datestart=Sys.Date()-366
interval="Y1"
URL <- composeURL("www.onvista.de/onvista/boxes/historicalquote/export.csv?","notationId=", notation, "&dateStart=", datestart, "&interval=", interval )
data<-read.csv2(URL,header=TRUE,sep=";",dec=",",na.strings=c(""))
My Problem is, that the genearetd table in R has either characters or factors, regardless my commands in the read.csv2
function.
My idea is, that this is because of the imported empty cells in line 254. But even when I command empty cells to NA, this does not work for the whole line and also does not influence the import for the numeric columns. They still apeear as either factors or characters.
Can anybody help me?