In cases where column names are either numeric or contain weird characters, running FLORAL Fine-Gray models return an error:
Error in `[.data.frame`(df_FG, , colnames(x)) :
undefined columns selected
This is due to how the code internally sanitizing the column names. It might be worth adding a line of validation, or at least a little warning/stop error letting the user know why the error is occurring. I put the following just before the newx <- as.matrix(df_FG[, colnames(x)]) line:
if (!colnames(x) %in% colnames(df_FG)){
warning("Sanitized column names do not match original column names; please simplify column names")
}
In cases where column names are either numeric or contain weird characters, running FLORAL Fine-Gray models return an error:
This is due to how the code internally sanitizing the column names. It might be worth adding a line of validation, or at least a little warning/stop error letting the user know why the error is occurring. I put the following just before the
newx <- as.matrix(df_FG[, colnames(x)])line: