Don't use this function unless you know what you're doing or just don't care about your R session. If you set the data to some unexpected value you are very likely to cause a SEGFAULT and crash the entire R session. Also, this modifies the existing object in-place, meaning that all variables pointing to this same ALTREP will be modified.
Value
x
, invisibly (because x
has been modified in-place you generally
won't want or need to store the return value)
Examples
x <- 1:5
set_alt_data1(x, c(10, 10, -1))
x
#> [1] 10 9 8 7 6 5 4 3 2 1