If you have a list of lists, the way to access those elements is like this:
Answer <- object[[first_list_index]][[second_list_index]] On Sat, Feb 7, 2026 at 12:43 PM Andre Luiz Tietbohl Ramos < [email protected]> wrote: > Hello, > > This message isn't directly related to finance for it just uses the problem > at hand contextually under the crypto domain. Thus, I have a data frame > made from exchanges' names and the intervals each exchange provides. See > below, please. > > exchanges.names <- c('binance', 'bitmart', 'bybit', 'crypto.com', 'huobi', > 'kraken', 'kucoin', 'mexc') > intervals <- list(list('1s', '1m', '3m', '5m', '15m', '30m', '1h', '2h', > '4h', '6h', '8h', '12h', '1d', '3d', '1w', '1M'), > list('1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', > '6h', '12h', '1d', '3d', '1w'), > list('1m', '3m', '5m', '15m', '30m', '1h', '2h', > '4h','6h', '12h', '1d', '1M', '1w'), > list('1m', '5m', '15m', '30m', '1h', '2h', '4h', '12h', > '1d', '1w', '2w', '1M'), > list('1m', '5m', '15m', '30m', '1h', '4h', '1d', '1w', > '1M'), > list('1m', '5m', '15m', '30m', '1h', '4h', '12h', '1d', > '1w'), > list('1m', '5m', '15m', '30m', '1h', '2h', '4h', '8h', > '12h', '1d', '1w'), > list('1m', '5m', '15m', '30m', '1h', '4h', '8h', '1d', > '1w', '1M') > ) > exchanges.intervals <- as.data.frame(cbind(exchanges.names, intervals)) > > exchanges.intervals > > exchanges.names intervals > 1 binance 1s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, > 3d, 1w, 1M > 2 bitmart 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 3d, 1w > 3 bybit 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1M, > 1w > 4 crypto.com 1m, 5m, 15m, 30m, 1h, 2h, 4h, 12h, 1d, 1w, 2w, 1M > 5 huobi 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M > 6 kraken 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w > 7 kucoin 1m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 1w > 8 mexc 1m, 5m, 15m, 30m, 1h, 4h, 8h, 1d, 1w, 1M > > Suppose now I want to get the 5m interval from the binance exchange. While > I can filter the binance row with, > > exchanges.intervals[exchanges.names == "binance", ] > > exchanges.names > intervals > 1 binance 1s, 1m, 3m, 5m, *15m*, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, > 3d, 1w, 1M > > I don't know how get the fourth element date from the filtered data frame > nested list. I need to use its data content. > Any help appreciated! > > TIA, > > -- > André Luiz Tietbohl Ramos, PhD > > [[alternative HTML version deleted]] > > _______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-sig-finance > -- Subscriber-posting only. If you want to post, subscribe first. > -- Also note that this is not the r-help list where general R questions > should go. > [[alternative HTML version deleted]] _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
