imperialCHEPI / healthgps-plots

A set of scripts for plotting and visualising data related to Health-GPS
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Modify R script and renv.lock file #4

Closed jzhu20 closed 7 months ago

jzhu20 commented 7 months ago

I changed the R script again and updated renv.lock file. I kept both ways of importing multiple files as Option 1 (command line) and Option 2 (all csv files in the directory) and added one line of combining dataframes in option 1, because we will need to combine all the simulation results (csv files) to take weighted mean and plot. From my perspective, option 2 is more convenient when importing a large number of csv files, like 50 or 100. Option 1 is more flexible if we need to import, e.g. 20 of the 50 simulation results.

When trying to use Rscript command, I received "Rscript command not found" which might be a common issue. I would suggest adding this part in README, e.g. $Env:PATH += "C:\Program Files\R\R-4.3.2\bin".

Actually I've got error message when running R script, as described in https://github.com/imperialCHEPI/healthgps-plots/issues/1.

Closes #1

TinyMarsh commented 7 months ago

Hi @jzhu20, does this issue address James' issue #1 ? Specifically this bit "we should be careful to weight the average by count for each group, and ensure that baseline and intervention data points are separated correctly -- the ordering of baseline and intervention results is not guaranteed".

The stuff to do with allowing arbitrary number of input files can be addressed later as that's now another issue.

TinyMarsh commented 7 months ago

Also, could you send me the data files you're using please? It seems the ones I have are missing some columns and so the script is now failing for me after your changes.

jzhu20 commented 7 months ago

Hi @TinyMarsh. Yes, weighted mean is guaranteed. I've put 49 simulation results in /Visualization/Indian_data_HLM. https://imperiallondon-my.sharepoint.com/:f:/r/personal/jjo11_ic_ac_uk/Documents/CHEPI/research/franco/Health-GPS_SHARED/Health-GPS_INDIA/[Visualization](https://imperiallondon-my.sharepoint.com/:f:/r/personal/jjo11_ic_ac_uk/Documents/CHEPI/research/franco/Health-GPS_SHARED/Health-GPS_INDIA/Visualization?csf=1&web=1&e=pxRVha)?csf=1&web=1&e=pxRVha

TinyMarsh commented 7 months ago

Hi @jzhu20, seems I do not have permission to view that link (or it's broken). Could you add me to the permissions?

jzhu20 commented 7 months ago

Hi @jzhu20, seems I do not have permission to view that link (or it's broken). Could you add me to the permissions?

Seems the link doesn't work. Can you check with this new link? https://imperiallondon-my.sharepoint.com/:f:/g/personal/jjo11_ic_ac_uk/EuIeELrQ5txOubPiGNIJCcMBBaEsNzWYgmUzxn6ki2sFRQ

TinyMarsh commented 7 months ago

@jzhu20 feel free to merge once you're happy.