-
Notifications
You must be signed in to change notification settings - Fork 103
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
Continued work on practical R-Instat scripts for our library #9247
Comments
Hello, I have reviewed all three while testing R-Instat version .80 and they all worked fine. |
Hello, |
@berylwaswa and @rachelkg while running through the script for the |
@derekagorhom I think it's best to change it based on where it will be saved? |
I have just created another r-script for the first Express start practical, please find it attached. |
@berylwaswa can you try
let me know what you think about this |
@derekagorhom that worked fine there was no error throughout the script |
@rdstern , @berylwaswa a. This is not really a problem now but it might be, assuming the user has an older version or uses an upgraded version of R-instat. This line will generate an error for the user in both cases. b. This second will give an error because these are not the user's file path on their PCs so for save RDS i created
and for the export also i did
but the issue i have is they look more of a VB structure than an R structure for saving or exporting. Any advise on the two codes will be appreciated. |
I also can run through tutorial 1 with no problem but I come to an error in tutorial 2 on the last command about saving the data. In the prepare script it is the export to excel and the save commands that get errors. This is consistent with your findings @derekagorhom. Who do you think might be able to help with your questions about this? I don't think anyone in this thread has enough coding experience. Maybe @N-thony? Do you have any thoughts on Derek's questions? |
Correct, this will give an error and not able to find the path when moving to a new version of R-Instat.
They are R code, and this looks good to me, we can pass directly the path in export or save code
or you can create a variable that will store the document path and re-use if the codes are all in the same file
and for the exports we can have
|
@berylwaswa , @rachelkg |
@derekagorhom you have missed some code as you can see below. Have you tested this before asking @berylwaswa to test again? |
@N-thony my mistake |
@derekagorhom here is another script you can check if it's okay, it works fine on my end. |
@derekagorhom here is another script. |
@derekagorhom here is another r script to review. |
@derekagorhom here is another script, the last bit however may need editing please check it out. |
@berylwaswa this zip file seems to have two issues with the rcode
kindly have a look at the code above, i do not see any difference between these 2 but they were both added and they produce the same results. Is there any reason why both r code were added to the script? The second one is the last line in that script (see below) |
@derekagorhom I have made the necessary changes; now below is the new script. The MICS data file is bigger than 25mbs so I'm sharing it with you on drive. Thanks. |
mics.zip
<https://drive.google.com/file/d/1oj7MmXm3WLoxnP_GDtCdLlfef6UbXIsw/view?usp=drive_web>
Kind Regards,
Beryl Waswa.
…On Wed, Dec 4, 2024 at 2:32 PM Derrick Agorhom ***@***.***> wrote:
@derekagorhom <https://github.com/derekagorhom> here is another script,
the last bit however may need editing please check it out.
a whole world of data.zip
<https://github.com/user-attachments/files/17977703/a.whole.world.of.data.zip>
@berylwaswa <https://github.com/berylwaswa> this zip file seems to have
two issues with the rcode
The first one is however simple:
# Producing a Scatter Plot in R-Instat
diamonds <- data_book$get_data_frame(data_name="diamonds")
last_graph <- ggplot2::ggplot(data=diamonds, mapping=ggplot2::aes(colour=cut, y=color, x=clarity)) + ggplot2::geom_jitter(width=0.40, height=0.40) + theme_grey()
data_book$add_object(data_name="diamonds", object_name="last_graph", object_type_label="graph", object_format="image", object=check_graph(graph_object=last_graph))
data_book$get_object_data(data_name="diamonds", object_name="last_graph", as_file=TRUE)
rm(list=c("last_graph", "diamonds"))
# Producing a Scatter Plot in R-Instat
diamonds <- data_book$get_data_frame(data_name="diamonds")
last_graph <- ggplot2::ggplot(data=diamonds, mapping=ggplot2::aes(colour=cut, x=clarity, y=color)) + ggplot2::geom_jitter(width=0.40, height=0.40) + theme_grey()
data_book$add_object(data_name="diamonds", object_name="last_graph", object_type_label="graph", object_format="image", object=check_graph(graph_object=last_graph))
data_book$get_object_data(data_name="diamonds", object_name="last_graph", as_file=TRUE)
rm(list=c("last_graph", "diamonds"))
kindly have a look at the code above, i do not see any difference between
these 2 but they were both added and they produce the same results. Is
there any reason why both r code were added to the script?
The second one is the last line in that script (see below)
image.png (view on web)
<https://github.com/user-attachments/assets/5441d65d-9846-4507-b9d3-f5d17f345c19>
I can guess you downloaded the file from MICS but it is currently not
available in the R-Instat Data library.
Can you kindly send the RDS file so that i can be added to the library.
Thanks.
—
Reply to this email directly, view it on GitHub
<#9247 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG2L3NGVVYXNCE6LVO3JZ3D2D26SZAVCNFSM6AAAAABRTTXYLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJWGU3TKNZVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@derekagorhom here is another script. It works fine in the developer's version, but there is an error in the 0.8.0 version when plotting a multiple-line plot. |
Our tutorials and other guides are usually in 2 forms.
We are starting the process of getting a third form of these guides, namely as scripts. Here is tutorial 1 as a script;
Tutorial 1 r-script.zip
I like this new form to complement the two existing forms.
They should run block-by block easily and I suggest that is pretty quick and can add to our other tests of new versions. (It can't replace using the dialogs, because they might have changed from the saved script.)
I have also liked the role played by the Comments feature in each dialog. Usually it becomes a comment in the output and that should help, if we make the comments useful - i.e. don't always ignore it, so you get the default.
Now we find, similarly, it becomes a comment in the script, once you press To Script! Nice.
It is good to have well commented scripts in general. I suggest @rachelkg could improve on the comments in this draft, and work with @[email protected] to produce well commented scripts.
The scripts will also show weaknesses in our coding of the dialogs. I further suggest @beryl and @Rachel could query those weaknesses as issues, so the R-Instat code could be improved.
For example, in Tutorial 1 I suggest there is a better structure to the commands generated for the One Variable Summarise, compared to the One Variable Graph.
Then I suggest one of the developers could become the script "partner" working under @N-thony to get more consistency in the scripts for the different dialogs.
The example on graphs could be the first task. That can start any time, but is not to be merged for this week's update.
The text was updated successfully, but these errors were encountered: