AWKruijt / JT-RCI

obtain and plot Jacobson-Truax and reliable change indices
10 stars 1 forks source link

Error: 'list' object cannot be coerced to type 'double' #2

Closed atanasj closed 3 years ago

atanasj commented 3 years ago

I am getting an error what could be the cause of...

I have specified the below code.

JTRCI(data = phd_sp_rc_wide,
      ppid = "ID",
      pre = "pb_mean_1",
      post = "pb_mean_2",
      group = "C",
      reliability = pb_rel,
      indextype = "JT",
      JTcrit = "auto"
)

I am getting the following error:

Error in JTRCI(data = phd_sp_rc_wide, ppid = "ID", pre = "pb_mean_1",  : 
  'list' object cannot be coerced to type 'double'

When I unlist() the dataframe I get the following error:

Error in data[, c(pre, post)] : incorrect number of dimensions

I'm not quite sure what is going on. Any help would be greatly appreciated. Please let me know if you need any more info.

atanasj commented 3 years ago

Sorry, I just realised what the problem was... as.data.frame() did the trick. Thanks.