Probably the question I'm posting is quite trivial/obvious, but as I'm new to creating a website and sharing material online I thought it was the right thing to expose my doubts here.
First of all, I thank the developers of the blogdown package for their great job and for making it possible to easily create a website using R and and organize multiple Rmarkdown files in one place.
I know that with blogdown it's possible to create posts in Rmarkdown format (.Rmd or .Rmarkdown) and I would like to use this feature to share some of my data analysis projects in R, showing the outputs generated by the code (summary, tables, graphs, model estimates etc.) based on the dataset used for the analysis.
The only problem is that for some of these projects I have used datasets that I cannot share online for privacy reasons or that have been obtained by accessing databases with username and password.
Therefore, as long as I create a post in .Rmd or .Rmarkdown format on my pc remotely, I can import my data by writing the path of the directories in which they are saved (or my credentials) and use them to reproduce the code, thus avoiding copy the datasets into the
content/project/name-project folders. But I don't know what happens when I have to deploy my site online. Hence my doubts arise:
If I deploy my site online and do not copy my datasets into the project folders, the .Rmd files will not have a reference with this data and therefore the R code used for the analysis will not be able to generate the outputs (?);
Suppose my site is hosted on a public GitHub repository, in this case anyone can see the contents within
content/project/name-project/index.Rmdand therefore also the username and password I have used to access the data.
Would it be more appropriate that in these cases I create posts simply by copying and pasting the outputs without actually executing any code? Or is there any workaround I could take?
Thanks in advance, I feel like I'm missing something.