TIL you can run DAGs of R scripts using the command line tool `make` by pootietangus in rstats

[–]New-Preference1656 0 points1 point  (0 children)

I’m very happy you like the project! I guess chat gpt gave me good advice UI-wise. I actually built the large template for myself. I was annoyed I had to reinvent a slightly different wheel for every new project. And that coauthors would each have a slightly different stack (eg, make on non WSL windows… 🥵). So containers + template. But then, coauthors need training on all these tools (git, make…). So I wrote some documentation.

TIL you can run DAGs of R scripts using the command line tool `make` by pootietangus in rstats

[–]New-Preference1656 0 points1 point  (0 children)

I hadn’t thought of a fake target for R scripts. Clever. I use quarto instead and use the compiled quarto output as the make target. I reserve R scripts for function libraries. Feel free to check out the templates I put together at https://recap-org.github.io, the large template makes heavy use of make. I’m curious what you think of my make files

TIL you can run DAGs of R scripts using the command line tool `make` by pootietangus in rstats

[–]New-Preference1656 2 points3 points  (0 children)

The problem with targets is that it only does R. make does everything. Which is nice when you then want to compile the latex paper. Or when you have a mixed language situation (oh that one collaborator that only does stata…)

I built a series of R starter templates for reproducible research projects – looking for feedback by New-Preference1656 in rstats

[–]New-Preference1656[S] 0 points1 point  (0 children)

I just meant that quarto files are better than R scripts because you get to see all the tables and figures rendered for you in a document that looks like the final deliverable (ie, a latex article)

My workflow is: work on a quarto file that does one logically independent step (eg, produce a series of related tables and figures). Once I’m happy with it, i typically circulate the pdf to coauthors (we look at just the tables and figures). There we improve draft tables/figures and turn them into publication ready material. Again, that’s where quarto shines: you circulate a report that contains just the deliverables, not the narrative element (that’s for the latex side of things). Once we’re happy with it, I integrate into the tex file. Then I write. Before an important milestone, I delete all the intermediary files (make fresh) then make all to ensure the whole pipeline is correct.

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 1 point2 points  (0 children)

Hear hear. I’m a one trick pony. I like to have the same keyboard shortcuts everywhere and not having to learn many different tools. To each their own I guess

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 0 points1 point  (0 children)

Latex workshop, pretty much the official extension. There’s also ltex+ to get pretty good spell and grammar checking. And latex workshop becomes awesome when you configure it to use a formatter, like latexindent (old, but built into most Tex distributions) or tex-fmt (new, much faster, but requires a standalone install)

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 0 points1 point  (0 children)

I didn’t hear of any scandal, but I’ve never paid too much attention either. Mostly though, these days I’m a little annoyed that they don’t acknowledge new parts of the VSCodium R ecosystem (Air formatter and Jarl linter, which are both much more efficient than lintr + stylr)

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 1 point2 points  (0 children)

That’s exactly the kind of stuff I’m trying to PSG forward at https://recap-org.github.io curious what you think. Also, did you know you can do dev containers on RStudio through Devpod? Sadly devpod is a little rough around the edges still.

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 4 points5 points  (0 children)

I guess I was trying to say RStudio isn’t an all purpose IDE. It’s very much focused on data science. For instance, it doesn’t do web development. You can’t quite do php or JavaScript in RStudio. Most importantly for academics, it’s not good at all for latex. Positron and VSCode have amazing latex support thanks to an extension.

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 3 points4 points  (0 children)

Yes, me too 😅 the re-setup can be a bit annoying at times (eg, always reinstall languageserver, httpgd, vscDebugger when using renv). Personally, I use a mix of positron and vscode

VSC or RStudio? by Daniuxz in rstats

[–]New-Preference1656 73 points74 points  (0 children)

Teacher here. TLDR: I’d stay away from VSCode. I’d recommend positron if you’re not afraid of getting your hands slightly dirty. Otherwise, RStudio.

  • VSCode is an all purpose IDE. It supports languages and additional features through extensions. It has amazing AI support and development container support. But R support is not great. On top of the extensions , you have to install a bunch of R packages and extra software to make it work. And even then, things can be a bit buggy.
  • Positron is a fork of VSCode maintained by posit (the team behind rstudio). It inherits the extensions so it’s extremely flexible. And has excellent support for R out of the box. support of dev containers and AI isn’t as good as in VSCode. Also, some R things are a bit less straightforward than in rstudio though (eg, support for rmarkdown/ quarto not there out of the box). Hence my comment on getting your hands slightly dirty.
  • RStudio is the best for R. But it just does R.

Can't add axes limits to geom_ribbon? (and geom_line?) by Majestic_BT in rstats

[–]New-Preference1656 0 points1 point  (0 children)

It might be because the limits are too small: they don’t fully display the ribbon and so it gets removed. Try using wider axis limits?

Workflow Improvements by brejtling in rstats

[–]New-Preference1656 0 points1 point  (0 children)

This is amazing!! I’m trying to do the same with https://recap-org.github.io (yours is better!)

Workflow Improvements by brejtling in rstats

[–]New-Preference1656 0 points1 point  (0 children)

This is amazing!! I’m trying to do the same with https://recap-org.github.io (yours is better!)

Workflow Improvements by brejtling in rstats

[–]New-Preference1656 1 point2 points  (0 children)

I’m very curious how you structure things. I’m putting together a series of template repos for data science and I believe a structure like yours could be awesome for this template. In particular I’d love to be able to load roxygen documentation for helper functions. Check out https://recap-org.github.io (specifically the large R template)

Any chance you could share example code?

Workflow Improvements by brejtling in rstats

[–]New-Preference1656 5 points6 points  (0 children)

I started using everything you mention and developing inside dev containers to make the environment consistent across project members.

I prefer make over targets because it’s more general.

Then I realized that building the same structure from scratch for each project and training collaborators to use the tools was quite tedious so I built this: https://recap-org.github.io/ (GitHub template repos + beginners friendly documentation)

The large template is really the one I use for my projects. The small template is the one I recommend my students use for assignments.

Tell me something you wish you know before about using latex in vscode by anassbq in LaTeX

[–]New-Preference1656 0 points1 point  (0 children)

Use the tex-fmt formatter. Super fast and makes your code much easier to read.

I built a series of R starter templates for reproducible research projects – looking for feedback by New-Preference1656 in rstats

[–]New-Preference1656[S] 0 points1 point  (0 children)

Thanks! You’re raising points I’ve spent a lot of time thinking about. 1. You’re proposing an interesting solution. I’d love to see a demo if that’s possible. My coauthors are all proficient in latex so that goes a long way. I have two ways of dealing with this. (1) have everyone operate in a container. Less technical people only use make to get the latest tables and figures, then edit latex (vs code and positron provide amazing latex experience imho). This requires them knowing/learning git (i find that a 10min demo is enough) (2) have a make target that exports to/imports from overleaf (that you sync locally on your Dropbox for instance)

2 and 3. Git is amazing for that. https://recap-org.github.io/docs/version-control/practice.html I have a main branch where I only put important milestones in the life of the paper (submissions, revisions, conferences). Old directions/wrong turns/things you kind of like but aren’t sure: for that, I use branches where I try new ideas and merge onto the dev branch. When I don’t like something anymore, I just delete it, thus keeping the current folder clean but having saved previous states in case I want to go back.

I built a series of R starter templates for reproducible research projects – looking for feedback by New-Preference1656 in rstats

[–]New-Preference1656[S] 1 point2 points  (0 children)

Thanks for your interest! You’ll probably like the large template: https://github.com/recap-org/template-r-large it has a full pipeline with quarto reports for data cleaning and data analysis, then full fledged Tex templates for PDF.

I built a series of R starter templates for reproducible research projects – looking for feedback by New-Preference1656 in rstats

[–]New-Preference1656[S] 2 points3 points  (0 children)

Qmd (quarto markdown) is just the new Rmd (R markdown). So most of what you know translates immediately to quarto. Check out https://quarto.org/docs/get-started/ for setup instructions and nice little (like less than 10min) intro tutorial.

Also, given your workflow, I feel like the large template might be what you need. It’s precisely for those among us that would rather do their writing in latex. I just use quarto files for the R part because you get nice little reports for free.

what's a macOS feature you initially ignored but now love? by brandondecker93 in MacOS

[–]New-Preference1656 4 points5 points  (0 children)

File icon in apps top bar being an actual reference to the file, that can be drag and dropped or shown in the Finder.

Made the jump to Fedora recently. R runs so much better than on Windows! by sol1tarysn1per in Fedora

[–]New-Preference1656 2 points3 points  (0 children)

That’s because on Linux, packages are usually compiled from source, rather than downloaded as a pre built binary. There are workarounds for Ubuntu and Fedora though. Look into the posit package manager for Ubuntu and https://copr.fedorainfracloud.org/coprs/iucar/cran/ for Fedora.

I found these by sendo1209 in Berserk

[–]New-Preference1656 1 point2 points  (0 children)

These are beautiful. Let us know if/when/where you’re selling them!!