@_wurli@fosstodon.org
@_wurli@fosstodon.org avatar

_wurli

@_wurli@fosstodon.org

Software developer 👨‍💻 | operational researcher 👨‍🔬 | data scientist 📊 | #RStats enthusiast

I also like to play guitar 🎸

This profile is from a federated server and may be incomplete. Browse more on the original instance.

_wurli, to random
@_wurli@fosstodon.org avatar

Bizarre discovery of the week: control-flow statements don't necessarily have to be within a set of braces, unless the code it at the 'top level'. Super weird.

https://github.com/r-lib/tree-sitter-r/issues/103#issuecomment-2088580114

_wurli,
@_wurli@fosstodon.org avatar

@gaborcsardi Aha! So it's just the else which causes some funkiness? I did some digging for the relevant documentation but struggled to find anything official about this.

_wurli, to random
@_wurli@fosstodon.org avatar

I'm asking about graphics devices on Stackoverflow - offering a +200 bounty for a canonical answer to whether we can hijack the default interactive devices somehow... Any answers appreciated!

Shamelessly tagging to bring to the attention of the Mastodon council of R graphics wizards: @coolbutuseless @yjunechoe @teunbrand

https://stackoverflow.com/questions/78303725/how-can-i-use-a-non-standard-graphics-device-interactively

_wurli, to random
@_wurli@fosstodon.org avatar

Made this cheatsheet for best practice a while ago for use in my workplace. Been recently thinking a bit more about how we can encourage folks to tighten up their workflows. Any approaches people have taken which have proved effective?

PDF on GitHub: https://github.com/wurli/r-best-practice

_wurli, to random
@_wurli@fosstodon.org avatar

PSA: {cli} pluralisation is magic 🧙‍♂️

brodriguesco, to python
@brodriguesco@fosstodon.org avatar

so mods removed the post, but what do you think? agree/disagree

_wurli,
@_wurli@fosstodon.org avatar

@brodriguesco My #1 wishlist feature for Python is syntactic macros. Whenever I code something serious, I always end up frustrated by the limitations of the syntax. I think this would solve that problem. There’s a draft PEP for this, but hasn’t shown any signs of movement for a while: https://peps.python.org/pep-0638/

_wurli, to random
@_wurli@fosstodon.org avatar

Interested to hear how folks track their own time/to-do lists in a work setting.

I've tried lots of methods which haven't really worked for me, e.g:

  • OneNote, colour coding bullet points based on status

  • Outlook, marking emails as 'to do'

  • Random snippets written in Notepad

For the past few months I've been using a folder of markdown docs. Each project/person I manage gets their own doc, and I edit them with vim. It's simple, quick, flexible, and seems to be working well for me so far.

_wurli,
@_wurli@fosstodon.org avatar

@gmschroe Been considering using Obsidian, heard nothing but good things. The difficulty in my situation is that, leading a team of data scientists, our work often isn't formal enough to lend itself well to tools like Jira, Kanban, etc, and it's deffo not all development, so GitHub/AZURE DevOps aren't great solutions either. For team work/time tracking I've set up a Gantt chart in Excel, which seems to be working okay. Individual to-dos I'm tracking using my own adhoc markdowns.

sckottie, to random
@sckottie@fosstodon.org avatar

just starting to ply with shinytest - curious if there are other pkgs out there for testing shiny? curious because it seems like it's not being actively worked on looking at commits and issues

_wurli,
@_wurli@fosstodon.org avatar
_wurli, to random
@_wurli@fosstodon.org avatar

When an package is deprecated or superseded in favour of another one, should maintainers add a field to the DESCRIPTION file to indicate the now preferred package?

One benefit might be that tools like {pak} could alert you if you directly install a superseded package...

_wurli, to random
@_wurli@fosstodon.org avatar

Introducing {updateme} - an package for keeping packages up to date 📦🔄 Usage is simple - just run library(updateme) to get helpful messages about new packages 💫

Still experimental, but can be tested! I'm already finding it super useful:

https://github.com/wurli/updateme

video/mp4

_wurli, to meta
@_wurli@fosstodon.org avatar

syntax idea: f(unction)-strings.

One could define a function to operate on a single string like so:

g" <- function(x) {
glue::glue(x, .envir = parent.frame())
}

This would basically give you something very similar to Python's f-strings:

g"1 + 1 = {1 + 1}"
#> [1] "1 + 1 = 2"

This idea comes from , which lets you define non-standard string literals in the same way: https://docs.julialang.org/en/v1/manual/metaprogramming/#meta-non-standard-string-literals

For me, this actually feels in keeping with R's stripped back, functional vibe.

_wurli, to random
@_wurli@fosstodon.org avatar

PSA: is incredibly good. Don't want to leave RStudio? No problem - it even runs great from the integrated terminal:

https://github.com/jesseduffield/lazygit

_wurli, to Excel
@_wurli@fosstodon.org avatar

A few tweaks to {pivotr} over the last few days - doubt I'll touch it again for a while, but overall very happy with how it's turned out🤸‍♂️

{pivotr} is an /shiny tool similar to 's PivotTables, but it also generates dplyr/tidyr code for you:

https://github.com/wurli/pivotr

video/mp4

_wurli, to ChatGPT
@_wurli@fosstodon.org avatar

Observation: when first hit the popular media, like everyone else, I was amazed by how human its responses were. Just over a year later, AI-generated text is everywhere, and I'm now equally amazed by how easy it is to spot.

_wurli, to python
@_wurli@fosstodon.org avatar

Currently learning as a long-time guy. Posting my thoughts as I go along.

R's {devtools} makes package development really nice:

  1. Write code
  2. Reload package with ctrl + shift + L
  3. Test the new code
  4. Go to (1).

I'm using for package development in Python, and I haven't found a workflow that feels half as nice as this. Am I missing something? Has anyone out found a system that does feel good to use?

More details on stackoverflow: https://stackoverflow.com/questions/77706005/best-workflow-for-python-package-development-in-vscode

_wurli,
@_wurli@fosstodon.org avatar

@grrrck @slackline Aha, that might be it. Thanks for the tip! Still, I think it's weird there doesn't seem to be a better solution out there.

_wurli, to python
@_wurli@fosstodon.org avatar

My solution to day 6. This was a really nice problem! It was a good feeling to break out the old quadratic formula after probably 4+ years.

image/png

_wurli, to python
@_wurli@fosstodon.org avatar

My #Python solution to #AdventOfCode day 5. Part 1 was a (relative) breeze, but part 2 was pure pain. That said, both parts now run in ~0.2 seconds, which is not too bad.

_wurli, to random
@_wurli@fosstodon.org avatar

Hey , I've just updated the cheatsheet for best practice in R 😀

Feel free to adapt this for your own use 💫

https://github.com/wurli/r-best-practice

_wurli, to random
@_wurli@fosstodon.org avatar

Genuine question: are there any tools outside of that come close to dplyr + tidyr + purrr for data wrangling?

_wurli, to random
@_wurli@fosstodon.org avatar

Hey , , looking for some advice.

I've been a public sector data scientist for about 4 years. I'm pretty good at it, but I've come to realise that my strengths are really in software engineering. I just really like it! I like making stuff, I like to read documentation, I like doing things as well as I can,, I like making things clear and I like explaining stuff to people.

Long term, I'm starting to wonder if I should lean into this and seek a career change.

(1/?)

_wurli, to random
@_wurli@fosstodon.org avatar

Hey , keen to hear opinions on this.

For analytical projects, the package structure provides many benefits but also quite a few gotchas for intermediate R users. I think a 'devtools-lite' that tries to remove as many of these as possible might be useful in this space:

Some feature ideas:

  • Soften up R CMD Check to ignore global variables and unrecognised files
  • Improve integration with {memoise}
  • Make testing easier (currently the working directory changes during testing)

(1/?)

_wurli, to mastodon
@_wurli@fosstodon.org avatar

I'm Jacob, enthusiast and data scientist currently working in the UK public sector. Enjoying for the lack of algorithm, but also looking for folks building cool things who I can follow :)

_wurli, to random
@_wurli@fosstodon.org avatar

Hey , here's a cheat sheet I put together about best practice for R. There's some stuff specific to my workplace, but in future I may make a more general version and submit it to Posit. Anything I've missed, or that you'd change?

Full res version here: https://dfe-r-community.github.io/posts/2023-03-14-best-practice-essentials/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • khanakhh
  • mdbf
  • InstantRegret
  • Durango
  • Youngstown
  • rosin
  • slotface
  • thenastyranch
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • cisconetworking
  • DreamBathrooms
  • megavids
  • magazineikmin
  • cubers
  • vwfavf
  • modclub
  • everett
  • ethstaker
  • normalnudes
  • tacticalgear
  • tester
  • provamag3
  • GTA5RPClips
  • Leos
  • JUstTest
  • All magazines