4 ms·
I'm about as old school as you can get with preference for CLI and simple text-oriented development environments. I recently picked up R again for a long-term
by matttproud 3y ago
I'm about as old school as you can get with preference for CLI and simple text-oriented development environments. I recently picked up R again for a long-term data science project (https://matttproud.com/blog/posts/teaser-weather-temp-representation.html https://matttproud.com/blog/posts/teaser-weather-temp-repres...) after having not used it since university. In spite of a fair bit of annoyance with the R language (https://matttproud.com/blog/posts/rant-and-r-melt-function.html https://matttproud.com/blog/posts/rant-and-r-melt-function.h...), I found RStudio to make the prototyping process with R actually tolerable. Big kudos to Posit and the R community for RStudio.
There are a couple of things I would love for the R ecosystem: project scaffolding to do bulk data generation (e.g., from continuously generated data sets). What's the best way to do this: makefiles, or what? I have a relatively short entrypoint R file that sources other leaf files to run specific analyses, but it makes the software engineer inside of me want to curl up and die.
- mjhay 3y agoreshape2 (where `melt` is from) has been deprecated for some time, and for pretty good reasons. Try dplyr and tidyr instead - they are much nicer and modern. The equivalent of melt would be pivot_longer. For packaging, renv is the usual choice. I wouldn't structure the package as a bunch of scripts with an entrypoint. Just write functions as you would in other languages, and keep any specific analysis script small. https://tidyr.tidyverse.org/ https://tidyr.tidyverse.org/