Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial impressions and quick suggestions #2

Open
statzhero opened this issue Mar 10, 2021 · 2 comments
Open

Initial impressions and quick suggestions #2

statzhero opened this issue Mar 10, 2021 · 2 comments

Comments

@statzhero
Copy link
Contributor

This is an excellent, commendable and much welcome effort. Many thanks!

Please take all with a grain of salt as I have not yet had the opportunity to spend enough time on using the template. Once I do I will provide more concrete and hopefully useful feedback. I'd be excited if this grows into a stable and maintained repo in the long-term.

Here are some ideas for the next version:

  • I didn't find the license even though there seems an explicit reference to it > "Read LICENSE for details". Crucial to know how it can be used and re-used.
  • I believe "Build" is not a default tab in the panes in RStudio, so it's extra tricky to find. (A no-makefile version may be more user-friendly for beginners, but I acknowledge the choice. Likewise: fewer package dependencies could be in the form of a template-light version.)
  • You may want to consider hidden variable names where appropriate, e.g. .df instead of df in read_config.R.

Finally, constructing tables, to me, are still a pain from RStudio to LaTeX and I have not found an easy, out-of-the-box workflow. There are many packages that provide functionality, but they are either too general or not flexible enough. What is needed is perhaps an extension of the template specifically to table styles in academic journals. R with its limitations on value and variable labels does not help, of course.

@joachim-gassen
Copy link
Member

joachim-gassen commented Mar 11, 2021

Hi there, thank you very much for your kind words! You raise some excellent points.

I didn't find the license even though there seems an explicit reference to it > "Read LICENSE for details". Crucial to know how it can be used and re-used.

Uups. Keep forgetting that. MIT License added. I also added a section to the README in order to explain what "substantial" means in our view. If you want you can comment on whether you think it is informative.

I believe "Build" is not a default tab in the panes in RStudio, so it's extra tricky to find. (A no-makefile version may be more user-friendly for beginners, but I acknowledge the choice.)

Here you are hitting on one of my preferences ;-) I have not yet found a software agnostic alternative to make that helps you to stay on top of file dependencies. As projects become large, these really can become painful to maintain and a potential source of serious error ("Uups, we forgot to update this table based on that one variable that we redefined"). Having a script that simply runs everything is an alternative but if you move to larger projects these scripts can run a while and one might get reluctant to run it.

This being said, we will discuss whether having an alternative run_me script for people wihtout access to make could be helpful. The thing that mildly concerns me here is the variation of shells that people have....

Fewer package dependencies could be in the form of a template-light version.

Good point. My guess is that we won't get rid of the core tidyverse and of knit/rmarkdown. Besides ExPanDaR (see below), most (all) of the other dependencies are linked to the example payload of the package. Maybe it is a good point to discuss this in the README.

You may want to consider hidden variable names where appropriate, e.g. .df instead of df in read_config.R.

Jupp. In this case it might be even simpler to remove the df as it is no longer needed. In principle, we are trying to keep the R code as simple as possible in order to make it easy for people to assess what the code actually does.

Finally, constructing tables, to me, are still a pain from RStudio to LaTeX and I have not found an easy, out-of-the-box workflow. There are many packages that provide functionality, but they are either too general or not flexible enough. What is needed is perhaps an extension of the template specifically to table styles in academic journals. R with its limitations on value and variable labels does not help, of course.

Oh yes. Here is the workflow that we currently use

ExPanDaR::prepare_descriptive_table(format = "latex")
ExPanDaR::prepare_correlation_table(format = "latex")
ExPanDaR::prepare_regression_table(format = "latex")

The first two functions create lists containing dataframes and knitr_kable objects of tables while the latter, being a wrapper around stargazer, produces latex output directly. Variable labels are stored in a lookup dataframe named var_names. The resulting latex code, however, has to be modified by hand (e.g., replacing the variable names by the labels provided in the lookup table) to take the desired design (See the code chunks in presentation.pdf for details). This works but is far from easy and out-of-the-box. Do you have a favorite approach of doing this?

And finally:

I'd be excited if this grows into a stable and maintained repo in the long-term.

This is what our plan is. With the help of the community we believe that it can be done.

Anyway: Thank you very much again for your feedback!

@statzhero
Copy link
Contributor Author

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants