rbtl-fs24 / project-alecumitu

This project report was prepared for the rbtl-fs24 course
https://rbtl-fs24.github.io/project-alecumitu/
0 stars 0 forks source link

Questions about code in project #3

Open alecumitu opened 1 month ago

alecumitu commented 1 month ago

Hi @larnsce @bonschorno ! Should we also have some code written directly in the qmd file or not? In the points table it says "Warnings are hidden from the compiled output, but code is shown in the compiled output" so does that mean you should see the code in the project published on GitHub Pages? I personally don't mind the code, but it seems a bit messy, especially if there is a lot of it. You can check my project using the link in the repository to see what I mean. Thanks a lot!

bonschorno commented 1 month ago

Hi @alecumitu,

Ideally, your folder structure/code looks as follows (text copied from here):

_"You will save the data underlying each displayed summary table and visualization in the data/final folder. This requires that each visualization and table is generated from an object that is not further transformed before the code for the visualization or table is written. Use the writecsv() function to save the data underlying each visualization and table in the data/final folder. Give the files the name of the label you have chosen inside the code-chunk. See example below."

So there's two ways to go about this:

1) For example, when you prepare the data for Table 1 in your report, summary_stats created under # Calculate the summary statistics, should be stored in data/final as a .csv or .rda file (as you wish). In the next step, you then read in this object by calling read_csv(data/final/summary_statistics.csv) and create the table. This way, "the table is generated from an object that is not further transformed before the code".

2) Alternatively, if you want to have everything in one place but want to make the report look less messy, you could consider hiding some of the code. You can find more information on this here.

I hope this answers your question!