@michaelchirico@fosstodon.org
@michaelchirico@fosstodon.org avatar

michaelchirico

@michaelchirico@fosstodon.org

Economist, data scientist. #rstats e.g. {data.table} {potools} {lintr}. Crosswords & languages.

PHL ✈️ SIN ✈️ SFO

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

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Help needed!

I want to email R-devel & get clarification on "Can we create custom connections in packages?"

I find the situation confusing because using the "Connections.h" is mentioned in R-exts manual - and so formally(?) part of the API

But this conflicts with the NOTE generated if you try to use "R_new_custom_connection()" which says it is "non-API"

Am I tilting at windmills? Poking the bear? HELP!

Edits/suggestions welcomed in the gist below.

https://gist.github.com/coolbutuseless/2b261e2f7f54206c1263fbca0e71ac64

michaelchirico,
@michaelchirico@fosstodon.org avatar

@coolbutuseless here's 5 CRAN packages using it, FWIW:

https://github.com/search?q=org%3Acran%20%2Fr_new_custom_connection%2F&type=code

(edit: {rredis} and {RGtk2} are not live on CRAN)

michaelchirico,
@michaelchirico@fosstodon.org avatar

@coolbutuseless cc @gaborcsardi who is maintainer on {archive} and {pak} and @jeroenooms for {curl}

michaelchirico,
@michaelchirico@fosstodon.org avatar

@coolbutuseless @gaborcsardi @jeroenooms now I just saw this r-devel message and am not sure if I'm missing something 😅😅

https://stat.ethz.ch/pipermail/r-devel/2024-April/083356.html

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

A handy thing about having a local CRAN mirror is that I can zgrep across the repository looking for code examples :)

#RStats #LifeHack

michaelchirico, (edited )
@michaelchirico@fosstodon.org avatar

@gaborcsardi @coolbutuseless 'org:CRAN /[^a-z0-9._]fun[(]/' for all calls to 'fun'

regex search of cran in browser is also way faster than zgrep

game changer!

now if we could only get them to index R objects as they do for other languages 🤔

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

Big congrats to the translation community! Next release will feature ~3,000 newly-translated messages, including completely new languages:

Arabic, Catalan, Hindi, Hungarian*

And big strides for other languages:

Spanish, Portugese, Mandarin

Wanna see R in your language? Head on over to Weblate 🎉

https://translate.rx.studio/projects/r-project/

*well, new-old-new-new

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

Friends don't let friends use Depends:

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

Am I hallucinating a nice inferno-style GitHub write-up on encodings in R by @gaborcsardi? I think @hadleywickham pointed me to it at some point 🤔

michaelchirico,
@michaelchirico@fosstodon.org avatar

@gaborcsardi @hadleywickham YES! thanks -- I was literally on your profile searching 'encoding' and it didn't come up 😵‍💫

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

CRAN landing page really needs to list recursive SystemRequirements IMO -- i.e., all the SystemRequirements of packages in your Imports/Depends/LinkingTo (and so on recursively).

Would make it much easier to install a given package on fresh systems without iterating / autoconf messages getting lost in the stream

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

the end of an era!! congrats @healthandstats on taking over as the new CRAN maintainer of {data.table} with the release of 1.14.10! 🚀🚀🚀

A word of gratitude to Matt Dowle for his long stewardship of the package and best wishes as he moves into an advisory role. What monumental shoes us new maintainers of the package have to fill!

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

Hi ! {lintr} is considering deprecating the extraction_operator_linter().

This linter blocks many usages of [ or $ to encourage using [[ instead. There are a few reasons for this, including avoiding partial matching.

However we're finding there are just a lot of false positives for the linter / cases where using [[ is really awkward as compared to $.

Do you use this linter? Have you found it particularly useful for your package/script? If so please let us know.

https://lintr.r-lib.org/reference/extraction_operator_linter.html

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

Another {lintr} 3.1.1 highlight : make_linter_from_xpath().

Really trying to make it as easy as possible to develop new linters -- now you "only" need to figure out the XPath for the lint you want and you're off! No more messy boilerplate.

I recently used this to help catalog all possible sites to use the new '%||%' within r-devel

https://github.com/r-devel/r-svn/commit/5cf7f691458e7c537e54b046fdba5ef4fcd75777

That ad hoc linter is recorded here (too long for a single toot):

https://github.com/r-lib/lintr/issues/2246#issuecomment-1817747512

michaelchirico, to random
@michaelchirico@fosstodon.org avatar

Highlighting the new '# nolint next' marker in {lintr} 3.1.1

Often throwing '# nolint' at the end of a long line looks messy -- either it's hard to see, or worse it bumps the width of the line beyond whatever limit you've set for yourself!

'# nolint next' gets around this by putting the marker on the previous line, making it more obvious & less distracting.

h/t @barbone for suggesting this!

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