0

I am using R and I have to recursively extract an object in this way:

obj$`1970-04-17 01:00:00`

However, the text after the $ changes in each run of the loop.

Is there any way to extract dynamically the object?

I tried:

eval(obj)

but no luck.

Thank you in advance.

Vitomir
  • 257
  • 1
  • 13
  • 2
    Use `[[` instead of `$` i.e. if you have a list with names, then do `for(nm in names(obj)) print(obj[[nm]])` – akrun May 21 '22 at 16:16

0 Answers0