ALTREP objects have two data slots, both of which can hold any R type. The exact meaning of each slot can depend entirely on the ALTREP class and how it wants to represent data.
Details
Although the exact meaning of each slot is flexible, a convention used in
R core is
for data1 to hold the "compressed" state of a type, and for data2 to
hold the "expanded" state. See the vignette("altrepr") for more
information.