次のようなデータを含む csv ファイルがあります。
"Date","Time","Open","High","Low","Close","Up","Down","Sell","Buy","Stop1","Stop2","Stop3","Target1","Target2","Target3"
04/18/2012,1335,1365.25,1366.00,1365.00,1366.00,2855,1153,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
04/18/2012,1340,1366.00,1366.25,1365.50,1366.00,450,607,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
04/18/2012,1345,1366.00,1366.00,1365.75,1365.75,300,263,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00
このコマンドを使用してファイルを読み取ると、文字マトリックスが得られます。
RawData = as.matrix(read.table(PathName,sep=",",header=TRUE))
typeof(RawData)
[1] "character"
これは、日付列が原因であることがわかります。
これを数値配列にする必要があります。上記で使用している read.table コマンドの代わりになるものは何ですか?