bd-R / bdclean

User-friendly data cleaning pipeline for the inexperienced R user

Home Page:https://bd-r.github.io/bdclean-guide/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should we download generateReport.R with package itself

vijaybarve opened this issue · comments

Is downloading the generateReport.R on the fly is good idea or should we just add it as part of the package?

Yes, downloading the file is a bad practice. But the problem is when the the package is installed source code is converted to .rdb and .rdx files. For the markdown to work we need .R file. So having .R file in the downloaded package is not possible. Which is why I opted to download and store the .R file in the class path of project and knit markdown from there. If you know of any ways to store Raw .R files in package installation do let me know and I will fix it.

1)Create a home for your raw raw data and preprocessing scripts to live in:
devtools::use_data_raw()
2) Move raw data into data-raw/
3) Create an R script in data-raw/ that reads in the raw data, processes it, and puts it where it belongs.
experiment1 <-
read.csv('expt1.csv') %>%
mutate(experiment = 1)
devtools::use_data(experiment1)

Can we use the above, in place of .csv file we can use .R or .rdb file.
Just a suggestion!!

Wow! This seems to be exactly what I should have done! Will try this and update this thread. Thanks a bunch Ashwin

@thiloshon I have the latest version up on the repo. You may take up this task.

@vijaybarve Sure, Ill start working on this.

Shall we close this one?