Re: [R-SIG-Finance] from a list of array to tibble

2023-10-17 Thread arnaud gaboury
In fact, I realized this is not recommended to give names to rows. A better approach is to add a column with all names as row. The following does the job: asset.stats <- as_tibble_col(unlist(my.ret.lst), column_name = 'Annualized_return') asset.stats <- rownames_to_column(asset.stats, var =

Re: [R-SIG-Finance] from a list of array to tibble

2023-10-17 Thread Adam Ginensky
Perhaps you should have used 'The trouble with tibbles" as your subject line :) On Tue, Oct 17, 2023 at 6:21 AM Enrico Schumann wrote: > On Mon, 16 Oct 2023, arnaud gaboury writes: > > > I work with a list of crypto assets daily closing prices in xts class. > Here > > is a limited example: > >

Re: [R-SIG-Finance] from a list of array to tibble

2023-10-17 Thread Enrico Schumann
On Mon, 16 Oct 2023, arnaud gaboury writes: > I work with a list of crypto assets daily closing prices in xts class. Here > is a limited example: > > asset.xts.lst <- list(BTCUSDT = structure(c(26759.63, 26862, 26852.48, > 27154.15, > 27973.45), dim = c(5L, 1L), index = structure(c(1697068800,

[R-SIG-Finance] from a list of array to tibble

2023-10-16 Thread arnaud gaboury
I work with a list of crypto assets daily closing prices in xts class. Here is a limited example: asset.xts.lst <- list(BTCUSDT = structure(c(26759.63, 26862, 26852.48, 27154.15, 27973.45), dim = c(5L, 1L), index = structure(c(1697068800, 1697155200, 1697241600, 1697328000, 1697414400), tzone =