Value 'List of 8'

Hi! I'm a new fan of Rstudio and need some help :slightly_smiling_face: please
Two doubts arise from the environment window:

1.- what does it mean 'List of 8'?
2.- I want to save the spei1/spei9/spei12/spei48 output on a .xlsx or .txt format, any ideas to do that?

A List is a kind of vector where each element can be a different kind of object. spei1 has 8 elements. The element named fitted seems to be a time series of 456 numbers and the element coefficients is an array with three dimensions. Notice that the element kernel is itself a list with three elements and I cannot tell from the image what those elements are.

There is no way I know of to write the list as a whole to a txt or Excel file. You would have to write out the elements individually. You can use the $ operator to access elements of the list by name.

FittedValues <- spei1$fitted

I have never written a time series to a txt or Excel file, so I am not sure if functions like write.csv() will work with that.

THANKS!
I solved this problem just a few minutes after I posted it just the way you're telling me.
Regardig the excel...

I worked with an excel database and so I modified the original adding my results on this way:

cuenca1$spei1<-(spei1[["fitted"]])
cuenca1$spei3<-(spei3[["fitted"]])
cuenca1$spei9<-(spei9[["fitted"]])
cuenca1$spei12<-(spei12[["fitted"]])
cuenca1$spei24<-(spei24[["fitted"]])
cuenca1$spei48<-(spei48[["fitted"]])

Then...
cuen=cuenca1 (-> I changed the name of my database because saving the modified excel with the original name, no changes were save)
write.csv(cuen, file="cuenquita.xlsx")
The final result can be seen from the screenshot.

FJCC, this is my first time asking for help in a forum (?), I was not sure of receiving an answer (but I had nothing to lose) so I am very happy that there are people ready to help and so fast!

Thank you very much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.