lobstr icon indicating copy to clipboard operation
lobstr copied to clipboard

Use the ALTREP inspect method in sxp

Open gaborcsardi opened this issue 4 years ago • 0 comments

To print ALTREP objects. The inspect method typically provides more information about the object. E.g.

❯ .Internal(inspect(1:100))
@7fa458bec718 13 INTSXP g0c0 [NAM(7)]  1 : 100 (compact)

❯ lobstr::sxp(1:100)
[1:0x7fa458be6a60] <INTSXP[100]> (altrep named:7)

❯ .Internal(inspect(tl))
@7fa458bec8d8 13 INTSXP g1c0 [MARK,NAM(7)]  ALTREP progress::tick_along
  @7fa458bec868 13 INTSXP g1c0 [MARK,NAM(7)]  1 : 10000 (compact)

❯ lobstr::sxp(tl)
[1:0x7fa458bec8d8] <INTSXP[10000]> (altrep named:7)

gaborcsardi avatar Sep 17 '19 10:09 gaborcsardi