'How to fix R error: “No consistency on the variables information”

I'm a newbie in r, recently I'm doing a joint modeling of longitudinal and time-to-event data, following the example in the R package "joineR", I only replace the relevant data and then I get this error on the first line of code, the picture is my data. I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.


### this is my data:
    
 dput(head(data))
    structure(list(
       num = c(1, 1, 1, 1, 1, 1), 
     fuyrs = c(1699, 1699, 1699, 1699, 1699, 1699), 
    status = c(0, 0, 0, 0, 0, 0)), 
 row.names = c(NA, -6L), 
     class = c("tbl_df", "tbl", "data.frame"))

### The relevant definitions are as follows:

        num: number for patient identification
      fuyrs: maximum follow up time, the unit is day
     status: censoring indicator (1 = died and 0 = lost at follow up)

### When I run the following code, it is different from the help manual:

     heart.surv <- UniqueVariables(data,
                                var.col = c("fuyrs", "status"),
                                 id.col = "num")
Error in UniqueVariables(data4, var.col = c("fuyrs", "status"), 
                         id.col = "num") : 
    No consistency on the variables information
r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source