error message during execution

19 views
Skip to first unread message

Todd Richards

unread,
Nov 28, 2022, 10:01:53 AM11/28/22
to brainGraph-help
Dear Chris, I am enclosing both my rstudio output window and my input data (which were saved as csv files as shown in the output.txt.  Can you please help me get this code to run?  Do I need to fix any of my input files?
Thanks.
See enclosed files.
Todd
anorm.csv
output.txt
thresholds.csv
covars_studyid.csv
atlas.csv
covars_group.csv

Chris Watson

unread,
Nov 28, 2022, 10:21:44 AM11/28/22
to brainGr...@googlegroups.com
Hi Todd, please read Chapter 2.1 of the brainGraph User Guide for how to get help properly. In particular:
  • save your code as a ".R" file (so I can easily execute it and replicate your error);
  • don't save the variables as individual CSV files;
  • and copy+paste the error message you received, but just the first error (as the others likely propagate from the first one).
Have you tried anything to determine the cause of the error? The "invalid first argument" error suggests to me that perhaps you are copying some code you saw somewhere (perhaps in the User Guide)? Have you tried understanding what the code does, and why that error *could* happen?
The more likely possibility is that it is an error with parallel processing (e.g., via "foreach") so have you tried running without parallelization? You didn't post anything about your environment so I'm not sure if this is the most likely error.

Thanks,
Chris

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/30596e40-d7ba-4252-b2a0-d409ac30c0c7n%40googlegroups.com.

Todd Richards

unread,
Nov 28, 2022, 12:23:18 PM11/28/22
to brainGr...@googlegroups.com
Okay, I was able to get this command to work without parallel processing
g.tmp <- graph_from_adjacency_matrix(A.norm.sub[[1]][, , inds[[1]][1]],
mode='undirected', diag=F,
weighted=T, subnet=regions.angu)

Thanks for the hints. I can take it from here.
Todd
> You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/J-RMM5_F_Uk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to brainGraph-he...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74j7P%3DXAZ_D2Omh_E%2BbaLKDUbQgqpJDNm_bmjXYPZzAXUA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages