Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing R package aod #31

Closed
terhorstd opened this issue Oct 4, 2021 · 2 comments
Closed

Missing R package aod #31

terhorstd opened this issue Oct 4, 2021 · 2 comments

Comments

@terhorstd
Copy link
Collaborator

When running the down-scaled version things break with a non-explaning error message:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-5-4ee3a90d4926> in <module>
----> 1 M = MultiAreaModel(network_params, simulation=True,
      2                    sim_spec=sim_params,
      3                    theory=True,
      4                    theory_spec=theory_params)
      5 p, r = M.theory.integrate_siegert()

~/multi-area-model/multiarea_model/multiarea_model.py in __init__(self, network_spec, theory, simulation, analysis, *args, **keywords)
    104                 json.dump(self.custom_params, f)
    105             # Execute Data script
--> 106             compute_Model_params(out_label=str(rand_data_label),
    107                                  mode='custom')
    108         else:

~/multi-area-model/multiarea_model/data_multiarea/Model.py in compute_Model_params(out_label, mode)
     59         print("Replacing base path with: %s" % basepath)
     60     # Load and process raw data
---> 61     process_raw_data()
     62     raw_fn = os.path.join(basepath, 'viscortex_raw_data.json')
     63     proc_fn = os.path.join(basepath, 'viscortex_processed_data.json')

~/multi-area-model/multiarea_model/data_multiarea/VisualCortex_Data.py in process_raw_data()
   1324                                 stdout=subprocess.PIPE)
   1325         out = proc.communicate()[0].decode('utf-8')
-> 1326         R_fit = [float(out.split('\n')[1].split(' ')[1]),
   1327                      float(out.split('\n')[1].split(' ')[3])]
   1328     except OSError:

IndexError: list index out of range

I've tracked this down to the call to Rscript SLN_logdensities.R returning an error which is not caught. Running the command manually on the command line reveals

$ Rscript SLN_logdensities.R .
Error in library("aod") : there is no package called ‘aod’
Execution halted

Problem found, but seems to be not easily to solve for non-R people:

$ R
> install.packages("oad")
[...]
Warning message:
packageoadis not available (for R version 3.6.0)

Unfortunately changing the version of R itself is not easily possible for me.
How can I continue the workflow?

@jarsi
Copy link
Collaborator

jarsi commented Oct 4, 2021

Thanks for reporting this. Just to be sure, did you try to install aod or oad? Your comment hints at a typo.

@terhorstd
Copy link
Collaborator Author

😄 good catch! 🎯
Indeed, installing aod works much better!
My apologies for bothering you with such stupidity...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants