brainGraph icon indicating copy to clipboard operation
brainGraph copied to clipboard

Error in code?

Open mdeserisy opened this issue 2 years ago • 2 comments

Hello!

I am new to using NBS in R but have used it before with success in MatLab. I am transitioning to R for cost reasons and would like to try to stay on that platform. When I am run NBS using this code:

NBS(control_reward_filtered, irr.parent_NBS_filtered, second.col)

I receive the following error: Error in :=(eval(sID), seq_len(dim(covars)[1L])) : Check that is.data.table(DT) == TRUE. Otherw irr.parent_NBS_filtered.csv second.col.csv control_reward_filtered.csv ise, := and :=(...) are defined for use in j, once only and in particular ways. See help(":=").

When I review the error using help and online it suggests there might be a corruption in the newest version of data.table and I need to revert to an old version. Is there a way to run the NBS package by calling an old version of data.table?

Attaching files called in this code as examples.

mdeserisy avatar Mar 17 '23 15:03 mdeserisy

Sorry, I only just saw this. Is that error message incomplete somehow? It looks like it might be missing some text. I would need to know what versions of R, data.table and brainGraph you're using. Might also be helpful to know what OS you're on, as well. And finally, please include the code you used to create the relevant data, everything leading up to the error.

cwatson avatar Mar 24 '23 11:03 cwatson

Hello!

Thanks so much for getting back to me. Please see the attached screenshot for package information and R version requested. I'm also attaching a screenshot with OS information, though its worth noting that I experienced the exact same error on both Mac and PC (and an older version of windows). Additionally attached is a screenshot of the error message and the Rdata file with the appropriate array. Finally, attached is an RMD file including everything leading up to the error. The csv files attached are the ones I called in dataset creation, etc. except for the attached Rdata and csv files with the datasets called in the RMD file to create the contrast file and brain data.

Thanks again for your help!

Mariah

HBN NBS data analysis_forGitHub.zip ersion of windows). allsubj_allcond_rsfc_rtoZ_array_ControlReward_array.zip

irr.parent_NBS.csv

Screenshot 2023-03-24 122609 image

image

mdeserisy avatar Mar 24 '23 17:03 mdeserisy