Move questions data frame to .csv file
vijaybarve opened this issue · comments
Need to move the data frame of questions to be asked to users to a .csv file for easy managament
We can use a similar approach as mentioned in below link to store .csv files in package.
Great. In this particular case even .rdx file would work. Main objective is to move this data out of code i.e. .R file, which will be a nightmare to maintain later once we start adding more and more questions.
Yes, we can store the quest
data frame in a .rda file which will be easy to manage and manipulate.
We can store it in .../data/sys.rda type of format.
For storing the options
which is a list, we will have to dynamically convert it into an R environment because R only supports environment data type.
We can use the below snippet to store the options list into options.rda format.
save(list=names(options), file="options.rda", envir=as.environment(options))
I have converted both the data frame and list into .rda , below is the link for the files.
https://github.com/AshwinAgrawal16/BiodiversitydatacleaningGSoC17/tree/master/FurtherProjectWork/Random
If there are any enhancements please suggest.
Mistakenly closed....
V 0.0.4 has nested question handling, now I think the package is ready to have this implemented. @AshwinAgrawal16 can you take this up?
Yes, I have started working on it, I noticed there is a vector "q" in the code which has no use.
q <- c("What is the lowest taxonomic level you require in your data.","Sub-species","Species","Genus","Family")
If there is a future use of the vector its fine.
Is the above .rda file format appropriate, if so I will generate a PR as soon as possible.
I do not remember why and where q was used, so go ahead and delete it.
.rda looks like a good approach.
Shall we close this issue? @AshwinAgrawal16 @tom-gu @thiloshon
Yes, we can close this issue, but can open a new one related to handling nested questions because it requires some discussion. @vijaybarve