You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when the safeframe class is stripped and restored, it is also added as the most internal class, but one may want to create a subclass of safeframe (e.g., linelist) and this should remain a safeframe subclass throughout all operations.
library(safeframe)
#> #> Attaching package: 'safeframe'#> The following object is masked from 'package:base':#> #> labelsx<- make_safeframe(
cars,
speed="Miles per hour"
)
class(x) <- c("linelist", class(x))
class(x)
#> [1] "linelist" "safeframe" "data.frame"y<-x[, 1]
#> Warning: The following labelled variables are lost:#> dist - NULL
class(y)
#> [1] "safeframe" "linelist" "data.frame"
identical(class(x), class(y))
#> [1] FALSE
Currently, when the safeframe class is stripped and restored, it is also added as the most internal class, but one may want to create a subclass of safeframe (e.g., linelist) and this should remain a safeframe subclass throughout all operations.
Created on 2024-12-03 with reprex v2.1.1
Session info
The text was updated successfully, but these errors were encountered: