Open rdstern opened 1 year ago
@rdstern I tested this today in PR #8707. Line 32 raises an error because R-Instat tries to create an output object from the line which it cannot do (this is part of a more general problem with handling output from the script window). The rest all seems to work fine (as far as I can see).
@rdstern It may be quite straightforward to add an extra check in R-Instat so that it doesn't attempt to generate output from databook statements. @Patowhiz could advise on this.
@lloyddewit the error you have posted above seems to suggest that a data frame with the name "evals" data does not exist in the databook. You can only add output objects of data frames that exist in the data book.
@rdstern, adding and getting objects from the databook requires the correct name of an existing data frame to be supplied. Looking at the script you have supplied, I'm cannot see the line that adds "evals" data frame into the data book You could decide to omit the data name parameter so that the object is just added to the data book without any attachment to the data sheet (something which I wouldn't recommend to a user who doesn't have advanced knowledge of the data book). This will mean you can retrieve it without specifying the data frame name.
On Wed, 10 Jan 2024 at 12:10, lloyddewit @.***> wrote:
@rdstern https://github.com/rdstern It may be quite straightforward to add an extra check in R-Instat so that it doesn't attempt to generate output from databook statements. @Patowhiz https://github.com/Patowhiz could advise on this.
— Reply to this email directly, view it on GitHub https://github.com/africanmathsinitiative/R-Instat/issues/8677#issuecomment-1884451975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBSU72QBK2DJJ5D77GGRQ3YNZLGRAVCNFSM6AAAAABAEFH74WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGQ2TCOJXGU . You are receiving this because you were mentioned.Message ID: @.***>
@lloyddewit and @rdstern, the script window has no knowledge of data book statements that relate to output objects, that is only checked by the R link when you run the scripts. Basically, if you don't have the data book R statements, the R link may call print or capture R functions.
I've written about this somewhere, I would recommend users to use the data book R statements because they align well with using the data book R library. If you use the data book statements the dialogs and different R-Instat windows will help you manage your R objects (data and output objects). That's the only power that R-instat has over R Studio when it comes to executing scripts.
@rdstern I have noticed that most issues you have faced are because of passing incorrect R parameters to the custom data book R functions. Which reminds me that we probably need good documentation of the common data book statements for R users.
On Wed, 10 Jan 2024 at 14:07, Conloop Technologies < @.***> wrote:
@lloyddewit the error you have posted above seems to suggest that a data frame with the name "evals" data does not exist in the databook. You can only add output objects of data frames that exist in the data book.
@rdstern, adding and getting objects from the databook requires the correct name of an existing data frame to be supplied. Looking at the script you have supplied, I'm cannot see the line that adds "evals" data frame into the data book You could decide to omit the data name parameter so that the object is just added to the data book without any attachment to the data sheet (something which I wouldn't recommend to a user who doesn't have advanced knowledge of the data book). This will mean you can retrieve it without specifying the data frame name.
On Wed, 10 Jan 2024 at 12:10, lloyddewit @.***> wrote:
@rdstern https://github.com/rdstern It may be quite straightforward to add an extra check in R-Instat so that it doesn't attempt to generate output from databook statements. @Patowhiz https://github.com/Patowhiz could advise on this.
— Reply to this email directly, view it on GitHub https://github.com/africanmathsinitiative/R-Instat/issues/8677#issuecomment-1884451975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBSU72QBK2DJJ5D77GGRQ3YNZLGRAVCNFSM6AAAAABAEFH74WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGQ2TCOJXGU . You are receiving this because you were mentioned.Message ID: @.***>
I am closing this issue. I still occasionally have the problem that graphs don't appear from script windows. But it is general, and I don't know (yet) what changes the behavior, so the graphs are not displayed.
They are always displayed when I start an R-Instat session - and I must be doing something to switch them off.
However, the discussion here is not helping. Hence I am closing.
I was trying some code for a data presentation. It is from the moderndive package that has added 2 useful geoms.
@Patowhiz this maybe more a question for you, than @lloyddewit because it runs perfectly, but the results, namely the ggplot graphs, run perfectly but no results appear. It is clealy working, because I can save the graph (that works fine) and then the use graph also works and shows the graph fine.
The code is from Patrick's and Antoine's insert dialog for moderndive package, with the geom_parallel_slopes examples. Here it is, but will be quicker to load it yourself.