Bug Report: Error in is.null(data)

70 views
Skip to first unread message

Arianna Thoksakis

unread,
Feb 20, 2024, 7:39:04 PM2/20/24
to hbayesdm-users
Hello,

I am attempting to run a drift diffusion anaylsis using your package. However, I keep getting the error:

Error in is.null(data) || is.na(data) :
  'length = 13407' in coercion to 'logical(1)'

This occurs when I execute this line of code:

output1 = choiceRT_ddm(data = df, niter = 2000, nwarmup = 1000, nchain = 4, ncore = 4)

I am using the attached data (although I am using the dataframe corresponding to the data- this is a .txt file with the dataframe info on it.)

Is there a way to resolve this issue? I am using the most recent version of R.

Thank you very much!
mydata.txt

Lukas Gunschera

unread,
Mar 19, 2024, 10:31:36 AM3/19/24
to hbayesdm-users
Hi athoksakis,

This appears to be a common issue and relate to the way more recent R versions evaluate "if (is.null(data) || is.na(data) || data == "") {". There's a thread on this here https://github.com/CCS-Lab/hBayesDM/issues/153. Hope this helps.

All the best,
Lukas

Nathan Benton

unread,
Jun 29, 2024, 11:28:52 PM6/29/24
to hbayesdm-users
Hey there! Not sure if you resolved this yet, but I was having the same issue. I was able to resolve it by inputting the direct path to the tab-separated .txt file in the 'data = ' argument.
Reply all
Reply to author
Forward
0 new messages