Removes all attributes from an object except for names, row.names, and class. This is useful for testing scenarios where you want to simulate data frames without custom attributes (e.g., fitted model objects stored as attributes).
Examples
if (FALSE) { # \dontrun{
# Create a data frame with custom attributes
df <- data.frame(x = 1:3, y = 4:6)
attr(df, "custom_attr") <- "some_value"
# Strip custom attributes
df_clean <- strip_attributes(df)
# df_clean will have only names, row.names, and class attributes
} # }