fsolt / dcpo_demsupport_data

1 stars 0 forks source link

Reproducibility Issue? #19

Open fsolt opened 4 weeks ago

fsolt commented 4 weeks ago

@sammo3182 says he can't compile because of a missing data_survey file. I don't find that one mentioned. All data-raw files called seem accounted for. I did find an issue in the code to download the results from OSF and generate dcpo_output: I was passing a regex to the pattern argument to osf_ls_files, but per ?osf_ls_files this argument "is a fixed, case-insensitive search." I confirmed the regex didn't work and that a simplified argument does. Does this solve your problem, Hu?

sammo3182 commented 3 weeks ago

Fred @fsolt, I'm running the current rmd and it still needs the data_survey to get the theta_summary in the following line.

https://github.com/fsolt/dcpo_demsupport_data/blob/30138f915f3586f6eac1b05016854b748a7f58c4/paper/dcpo_demsupport_data.Rmd#L642

fsolt commented 3 weeks ago

I don't find data_survey in either dcpo_demsupport_data/paper/dcpo_demsupport_data.Rmd or in DCPOtools::summarize_dcpo_results, which is called in L642. Can you screenshot your error message, @sammo3182?

sammo3182 commented 3 weeks ago

Ahh~you're right, Fred @fsolt . I misread the chunk the error in this version. It appears here:

https://github.com/fsolt/dcpo_demsupport_data/blob/30138f915f3586f6eac1b05016854b748a7f58c4/paper/dcpo_demsupport_data.Rmd#L671-L684

And here's the error:

Error:
! No such file: D:/Seafile/WW_research/01_Research/dcpo_demsupport_data/../data/dcpo_surveys/misc_files/afrob_files/afrob2/NA
Backtrace:
  1. rmarkdown::render(...)
  2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  3. knitr:::process_file(text, output)
  6. knitr:::process_group(group)
  7. knitr:::call_block(x)
     ...
 14. base::withRestarts(...)
 15. base (local) withRestartList(expr, restarts)
 16. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 17. base (local) docall(restart$handler, restartArgs)
 19. evaluate (local) fun(base::quote(`<smplErrr>`))

Quitting from lines 672-684 [v_data] (dcpo_demsupport_data.Rmd)
Execution halted
sammo3182 commented 2 weeks ago

Fred @fsolt, I still hit on the data wall for replicating the appendix. I might need data from m5_data to process the next chunk. I got the following error when compiling the current version of rmd:

Error in `read_cmdstan_csv()`:
! Assertion on 'files' failed: No file provided.
Backtrace:
  1. rmarkdown::render(...)
  2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  3. knitr:::process_file(text, output)
  6. knitr:::process_group(group)
  7. knitr:::call_block(x)
     ...
 14. base::withRestarts(...)
 15. base (local) withRestartList(expr, restarts)
 16. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 17. base (local) docall(restart$handler, restartArgs)
 19. evaluate (local) fun(base::quote(`<smplErrr>`))

Quitting from lines 1480-1505 [m5_data] (dcpo_demsupport_data.Rmd)
Execution halted
sammo3182 commented 2 weeks ago

Fred @fsolt , I can't see how 5ce5272fc49aab2b9092766cfe8ebf83eb4a9bd8 fixes the above problem. Or the update was not for that? The primary issue seems still the downloading step from osf, as you mentioned once in our lab:

PixPin_2024-10-18_09-27-00

In our repo at osf, there are multiple folders in folders to contain csv files. As shown in the above screenshot. Based on my test, the current level of osf_ls_files does not go into the subfolders recursively, so the function will download nothing to store in \m5.

https://github.com/fsolt/dcpo_demsupport_data/blob/92620f54de67e1f7d2db6e8f6d692d103f8374f4/paper/dcpo_demsupport_data.Rmd#L1482-L1485