Hey,
I'm trying my hand at creating a simple Jamovi module, and I'm stuck on two issues.
1: A for loop which has no problem running regularly in Rstudio is hitting a subscript out of bounds error when run in Jamovi.
2: A ggplot graph being produced doesn't match what is produced using the same data in Rstudio. I think that this error might be related to the first, as the issue seems to be an improperly created data frame, which I make in a different loop.
Is there any special considerations that need to be made when looping in a Jamovi module?
Thanks!
ggplot2/looping trouble
Re: ggplot2/looping trouble
* I've killed the loops for now to focus on the ggplot issues. The aes(colour = ) argument seems to be the source of my trouble. In Jamovi it is only doing the first and last factors, none of the in-between ones...
Re: ggplot2/looping trouble
Do you have your code posted on github somewhere so I can have a look?
Cheers,
Ravi
Cheers,
Ravi
Re: ggplot2/looping trouble
Ya - https://github.com/lucasjfriesen/Jamovi-Module
* I've also just noticed that the issue is more clearly something weird by applying a facet_wrap() on the colour variable... Only 2 facets in Jamovi, same code in Rstudio gives 7 facets.
* I've also just noticed that the issue is more clearly something weird by applying a facet_wrap() on the colour variable... Only 2 facets in Jamovi, same code in Rstudio gives 7 facets.
Re: ggplot2/looping trouble
So I checked the plotData object in your code and the Estimate column only contains two levels: "V2" and "power". This is the plot I get (which makes sense when you use that data frame):
Re: ggplot2/looping trouble
Oh my word. Yup. For testing in R I've been filling in the values manually, defaulting to a more advanced case where there are multiple xbars.... Well, thanks!
Re: ggplot2/looping trouble
Happy to help
Did you also manage to solve your looping problem?
Did you also manage to solve your looping problem?
Re: ggplot2/looping trouble
Yup - It was related to those same default values. Starting to get the hang of this system I think.
Re: ggplot2/looping trouble
there's an open invitation for anyone to write a guest blog post of their experiences 'getting started' developing jamovi modules, if that's the sort of thing which interests you.
cheers
cheers