R関数write.csv
はエラーを返します。
これが私が書きたいdata.frameです:
> VaRStats
A Index B Index C Index
Daily VaR -0.65006 -0.50391 -0.5557
Daily CVaR -0.75679 -0.57491 -0.65174
5 Days VaR -1.4204 -1.0077 -1.2269
これがクラスですVaRStats
:
> class(VaRStats)
[1] "data.frame"
そして、これが次のdput()
出力ですVaRStats
:
> dput(VaRStats)
structure(list(`JWFXA Index` = structure(list(`NA` = -0.650061101980277,
`NA` = -0.756791819719978, `JWFXA Index` = -1.42035638029947), .Names = c(NA,
NA, "JWFXA Index")), `CCYT1 Index` = structure(list(`NA` = -0.503912574910245,
`NA` = -0.574907003405759, `CCYT1 Index` = -1.00773735259718), .Names = c(NA,
NA, "CCYT1 Index")), `FX Multistrategy Index` = structure(list(
`NA` = -0.555699685451229, `NA` = -0.651738541799373, `FX Multistrategy Index` = -1.22688572580144), .Names = c(NA,
NA, "FX Multistrategy Index"))), .Names = c("JWFXA Index", "CCYT1 Index",
"FX Multistrategy Index"), row.names = c("Daily VaR", "Daily CVaR",
"5 Days VaR"), class = "data.frame")
write.csv
関数を介して生成されたエラー
> write.csv(VaRStats, "SummaryStats.csv")
Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec, as.integer(quote), :
type 'list' not implemented in 'EncodeElement'
そんなことがあるものか?