MUCollective / multiverse

R package for creating explorable multiverse analysis
https://mucollective.github.io/multiverse/
GNU General Public License v3.0
62 stars 5 forks source link

Weird object / character conversion when knitting #76

Closed abhsarma closed 3 years ago

abhsarma commented 4 years ago

This is spinning my head and I am not sure we care about it enough to make sense of it, but essentially here: https://github.com/MUCollective/multiverse/blob/ff579e63293b1c116a057d5bbacbea7947254fab/R/engine_multiverse.R#L12

options$inside is a string, which is why I have to do this .multiverse = get(.multiverse_name, envir = knit_global()) in the function to get the object

But in this other function here: https://github.com/MUCollective/multiverse/blob/ff579e63293b1c116a057d5bbacbea7947254fab/R/engine_multiverse.R#L61

options$inside is an object of class multiverse

I am just very confused and questioning a lot of things right now. Thoughts @mjskay ?

mjskay commented 4 years ago

Uh dunno. I would use a debugger to step through it and see what is happening.

Is this high priority --- do you have a workaround that works for now? If so I can take a look later this month when I have cycles again, but I won't worry about it in the short term.

abhsarma commented 4 years ago

Yeah it works rn, but I am not exactly sure how or why... I don't think I can use a debugger because the problem arises when knitting. But yeah it is definitely not urgent

mjskay commented 4 years ago

It looks like the debugger can be used with rmarkdown, but it is a bit awkward: https://support.rstudio.com/hc/en-us/articles/205612627-Debugging-with-RStudio#debugging-in-r-markdown-documents