@urswilke@fosstodon.org
@urswilke@fosstodon.org avatar

urswilke

@urswilke@fosstodon.org

#RStats etc., data, programming, music, #rtistry, ...

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

paezha, to random
@paezha@mastodon.online avatar

@urswilke

Good morning, Urs - I am working with @meghansharris @jacquietran, and Antonio Sanchez on a book on generative art using R.

As part of the book, we would like to interview a few generative artists that we like and ask for permission to use their responses in the text. We believe that this will give a broader perspective on current trends on generative art. We have a preliminary questionnaire, and we'd be happy if you wanted to respond in writing, or to chat with us.

urswilke,
@urswilke@fosstodon.org avatar

@paezha @meghansharris @jacquietran
Hi Antonio
Good morning from Berlin! :)
That sounds really interesting. Thanks for contacting me! Feel free to send me the questionnaire, or if you prefer to chat, that would also be nice. ☺️

emjonaitis, to random
@emjonaitis@mathstodon.xyz avatar

Looking for beginner resources for R package development. Specifically, I've got a package where I need to make some moderately large changes in a function, and I need to keep the package usable in its current stage on my machine while I develop and test the new version. How does one do this? I don't think this is a git question, I think this is an R question.

urswilke,
@urswilke@fosstodon.org avatar

@emjonaitis

I also like the approach to develop new functionality directly in the debugger where it happens. Like @tylermorganwall suggested but not with functions but rather new dev objects that can be successively developed and compared next to the original ones.

As soon as you have what you want you can then move the new code to its own functions etc. and finally remove and replace the old functionality when everything works

MattCrumpLab, to random
@MattCrumpLab@fosstodon.org avatar

{midiblender} is now up on my github.

It's the beginnings of an package for experimental mangling of files. TBH, it's my personal experimental hacky-code base wrapped in R package clothing. I'm messing with it constantly, and sharing in case others are interested.

Will it blend? 🤷‍♂️

https://www.crumplab.com/midiblender/

urswilke,
@urswilke@fosstodon.org avatar

Thank you so much for the shout out @MattCrumpLab !

Soo nice to see you doing all these things with midi in R. I'm really happy to have contributed to your adventures and feel honoured that you dived so deeply into my packages.

I meant to write much earlier, but every time I looked back at your posts you had already produced new things and I wanted to catch up first. Really love the energy how you write about your journeys on your blog. Seeing this new package now is truly amazing! Congrats!!

urswilke,
@urswilke@fosstodon.org avatar

@MattCrumpLab ❤️

urswilke, to random
@urswilke@fosstodon.org avatar

Thanks for the kind words! I'm really glad if it could help.

I think I was about to learn OOP when writing this package 😺

And I have looked at your blog post again. Super nice to see you using these packages and pivoting notes on your own and got something working out!! (this was my main motivation writing these packages: I thought having note_on & _off events on the same line in a dataframe could help wrangling with #midi data..)

urswilke,
@urswilke@fosstodon.org avatar

Regarding the silence at the end of the track, I checked the R code and everything seems right. I also guess it has to do something with the python code.

MattCrumpLab, to random
@MattCrumpLab@fosstodon.org avatar

I might need to manipulate and synthesize midi in R, so I spent the afternoon trying to make various packages work. They are all wrappers for python stuff. It wasn't a cake walk, but I finally made an mp3 of the top gun theme song = declaring victory

https://homophony.quest/blog/32_1_30_24_R_synth/

urswilke,
@urswilke@fosstodon.org avatar

@MattCrumpLab

Really nice to hear that you used the pyramidi package I've written some time ago!

I hope it wasn't too frustrating. You have to feel adventurous to use it.

The package is highly experimental and doesn't work for all sorts of midi files. And it was a bit cumbersome to harmonize the development with the related python package...

urswilke,
@urswilke@fosstodon.org avatar

@MattCrumpLab
whoops! I think I posted my reply in the wrong place...

https://fosstodon.org/deck/@urswilke/111861175759116362

It was supposed to appear here. Sorry about the confusion

andrew, to random
@andrew@fediscience.org avatar

Finally decided to switch from %>% to |> this semester! #rstats

urswilke,
@urswilke@fosstodon.org avatar

@EvaMaeRey

at least the first example is also possible with the base pipe now.

E.g., you can now do:

> list(3, 4) |> _[[1]]
[1] 3

(R 4.3.2, but don't know since which R version)

josi, to random
@josi@fosstodon.org avatar

Are there any good blog posts on using {testthat} snapshot tests with GHA? _snaps is added to the gitignore so there is no snapshot to verify against.

urswilke,
@urswilke@fosstodon.org avatar

@josi
why do you want to gitignore the _snaps folder? I think you shouldn't do that. Then it's the same on GHA as locally I think.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Free #RStats project idea:

geom_vwline()

Wrap Paul Murrell's {vwline} package for variable width lines.

https://cran.r-project.org/web/packages/vwline/index.html

urswilke,
@urswilke@fosstodon.org avatar
eliocamp, to random
@eliocamp@mastodon.social avatar

Has any user within reach has used the groundhog package? I tested it and it was very hard to get it going (I had to run R with R --vainilla) and then it botched my user library. Perhaps I did something very wrong.

urswilke,
@urswilke@fosstodon.org avatar

@eliocamp @danwwilson @milesmcbain

haven't tested, but does this help?
renv::checkout(date = "2023-02-08") (described here: https://rstudio.github.io/renv/news/index.html#new-features-1-0-0)

jimgar, to random

Anyone know if there is a way to make a pkgdown site hosted on GitHub private? So people can’t just go to packagename.github.io/packagename willy nilly? I set it up with usethis::use_pkgdown_github_pages

urswilke,
@urswilke@fosstodon.org avatar

@jimgar
you can also deploy pkgdown sites on gitlab. There you can set the repos (and with them their pkgdown sites) to private iiuc. See here: https://gitlab.com/urswilke/example_gitlab_ci_pkgdown_and_devtools_check2 or the #RStats repos on https://gitlab.com/r-packages/ (of @matherion - my goto reference for R package ci on gitlab)

urswilke,
@urswilke@fosstodon.org avatar

@jimgar :(

urswilke,
@urswilke@fosstodon.org avatar

@jimgar but iiuc it's a local site and not a website then - strictly speaking :)
and how do you make sure that the pkgdown site is up-to-date? - that's what I like most about deploying it on github/gitlab: I don't need to rerun
pkgdown::build_site()
after updating the code.
and I also prefer browsing the pkgdown sites rather than the R help in RStudio for instance

barbone, to random

I recently found out I can do parenthetical method chaining (there's a real term for this right?) in like the examples below.

args <- (  
 scribe::command_args()  
 $add_argument("foo", action = "flag")  
 $add_argument("bar", action = "list", default = 1)  
 $parse()  
)  
wb <- (  
 openxlsx2::wb_workbook()  
 $add_worksheet()  
 $add_data(x = datasets::attitude)  
)  

I think I'm going to update a lot of scripts now.
@RStats

urswilke,
@urswilke@fosstodon.org avatar

The important part is to put the $ at the end of the line and not in the next line, as R then continues to parse the following line and perceive it as one expression,
(Like with pipes, but also works for other stuff like +, &, etc...).
In other words: as long as it's not a complete expression at the end of the line, the parser continues adding the following line.
I think I recently read that somewhere but I forgot where

djnavarro, to random

I think I need to start muting white cishet men talking about how [insert name of social media site that is grossly toxic to minorities] is fun for them. I can't deal with that in my life right now

urswilke,
@urswilke@fosstodon.org avatar

@djnavarro
An analogy that I like: every living being has to take up space, even plants

schochastics, to random
@schochastics@fosstodon.org avatar

The package rtoot can now also be used to boost/favourite/bookmark statuses 🙂

https://github.com/schochastics/rtoot

urswilke,
@urswilke@fosstodon.org avatar

@schochastics Here seems to be the docs for this functionality:
https://schochastics.github.io/rtoot/reference/post_status.html

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