@gaborcsardi@fosstodon.org
@gaborcsardi@fosstodon.org avatar

gaborcsardi

@gaborcsardi@fosstodon.org

Software Engineer at Posit PBC

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

gaborcsardi, to random
@gaborcsardi@fosstodon.org avatar

R-hub v2 is here!

It is a completely new system, better and faster! See the details in the blog post: https://blog.r-hub.io/2024/04/11/rhub2/

@RConsortium

gaborcsardi, to random
@gaborcsardi@fosstodon.org avatar

R 4.4.0 is coming in less than one month!

With rig you can try the first alpha easily while keeping your current R version. Run

rig add next

to install, and then

R-next

to start R 4.4.0 alpha.

On Windows, macOS or one of the many supported Linux distributions.

See https://github.com/r-lib/rig#readme

millerdl, to random
@millerdl@mathstodon.xyz avatar

pals, if I have a nested set of lists:

  1. thing
  2. another thing
    a. sub thing
    b. second sub thing
  3. back here again

quarto will render this as three separate lists, so the sub-list will not be indented. I can manually insert a <ul></ul> and get something close to what I want, but am I missing some other work-around for this?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@millerdl I think you need more indentation, plus in regular markdown you cannot use letters as item heads, but you can probably use CSS to change the roman numbers to letters:
https://gist.github.com/gaborcsardi/c7cd779a22d769425da4cf4d4b0836c3
(Click on "raw" for the source code.)

It is also possible that quarto has a better solution for this, IDK.

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 ๐Ÿค”

gaborcsardi,
@gaborcsardi@fosstodon.org avatar
gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@michaelchirico I added a description and some keywords. I also had a hard time finding it last time...

Ifeanyi5, to random
@Ifeanyi5@mastodon.social avatar

Please, what is the latest with regards to ShinyLive? Can it now load and run all R packages? Also, is it now possible to deploy a Shiny app built using ShinyLive?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar
stats_tobby, to random
@stats_tobby@fediscience.org avatar

What can I do to ensure my will smoothly run on r 4.4.0?

so far I think I should:

  • check the cran issues page
  • run checks on devel some days before the release

anything else?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@stats_tobby Use a CI service to keep your package in a good shape: https://www.tidyverse.org/blog/2022/06/actions-2-0-0/

Try the new version of R-hub: https://github.com/r-hub/rhub2

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@stats_tobby You can use R.rsp on GHA, no problem with that.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@stats_tobby Oh, right, that is from pkgbuild. You can add this to DESCRIPTION:

Config/build/clean-inst-doc: FALSE

(in one line). See https://github.com/r-lib/pkgbuild#description-entries

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

The {R6} package is a godsend for turning my ad-hoc buffoonery into something tame and delightful!

Should I be converting to {S7} ?

https://cran.r-project.org/package=R6

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@coolbutuseless R6 is primarily for things that need reference semantics.

gaborcsardi, to random
@gaborcsardi@fosstodon.org avatar

If you want to try the new R 4.3.3 release without upgrading, try https://github.com/r-lib/rig#readme

brodriguesco, to random
@brodriguesco@fosstodon.org avatar
gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@jimgar @brodriguesco Leap year reference, I believe.

gaborcsardi, to random
@gaborcsardi@fosstodon.org avatar

Just updated https://github.com/r-lib/actions/releases/tag/v2, please report if you see GitHub Actions weirdness.

coolbutuseless, to random
@coolbutuseless@fosstodon.org avatar

Does someone know of a tarball/sqlite/something with lots of info about the packages on CRAN?

E.g. database of information from all DESCRIPTION files

I might just have to start my own CRAN mirror to mine for what I want....

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@coolbutuseless

tools::CRAN_package_db()  

?

flaviaerius, to random
@flaviaerius@fosstodon.org avatar

Quick #rstats tip of the day.

When preparing a string for a #sql query, use paste0 + collapse with single quotes inside of double quotes:

> paste0(names, collapse = "' , '")

Tada! Just add ' before and after and you have generated the string you need for your query.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@flaviaerius Even better, use DBI::sqlInterpolate(), DBI::dbQuoteString(), etc. to avoid SQL injections.

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@flaviaerius It does not require a database connection, see the examples.

dzegpi, to random
@dzegpi@fosstodon.org avatar

Is it recommended to restart the R session previus to use devtools::load_all()?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@dzegpi No, no need to do that usually.

danwwilson, to random
@danwwilson@rstats.me avatar

How nice would it be if gracefully handled trailing commas in lists and vectors.

I bet no one can guess what is giving me the most grief today. ๐Ÿคฆโ€โ™‚๏ธ

gaborcsardi,
@gaborcsardi@fosstodon.org avatar
tyx, to bioinformatics

The most annoying things in data analysis:

  • R package/lib hell
  • basic Python API instability
  • conda solving envos for hours
  • lustre (all about it)
  • each R package having it's own class for genetic/trees/geospatial data storage.

I have freaking bingo of hitting all of them today at once.

Are there any I missed?

#rstats #conda #lustre #dllHell #PackageHell #DependencyHell
#geospatial #bioinformatics #hpc

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@tyx What exactly is R package/lib hell? Do you have some examples?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@devSJR @tyx What about them?

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@tyx Yeah, this is all very painful, but it is also not specific to R, or is it? I imagine most software have the same issue if you use external packages.

Btw. we do have some tools that let you "time-travel", e.g. https://packagemanager.posit.co/client/#/ gives you Linux binaries since 2017, or you can use Windows binaries even from CRAN.
Another one is https://github.com/r-hub/evercran which comes with daily CRAN snapshots, and works on older Debian containers, so you also get older versions of the system deps.

yjunechoe, to random
@yjunechoe@fosstodon.org avatar

Just switched to rendering my #rstats pkg readme examples with {asciicast} to do justice to the countless hours I put into making pretty print methods with {cli} ๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š

https://github.com/yjunechoe/jlmerclusterperm

Readme example using asciicast to capture cli list bullets with original formatting

gaborcsardi,
@gaborcsardi@fosstodon.org avatar
gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@yjunechoe @jonthegeek Np. Let me know if you have issues.

Btw. bonus feature: on GH you get light images in light mode and dark images in dark mode: https://github.com/r-lib/callr#readme

smach, to rstats
@smach@masto.machlis.com avatar

โ€œIt is sometimes useful to perform a computation in a separate R process, without affecting the current R process at all.โ€ The {callr} ๐Ÿ“ฆ โ€œdoes exactly that.โ€ By @gaborcsardi & others
https://callr.r-lib.org/
@rstats

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@Mehrad @smach I am not sure why message() goes to stdout, it is a historical R thing. Probably because only the "data" should go to stdout, and everything else to stderr.

Will fix the images on the pkgdown site asap!

gaborcsardi,
@gaborcsardi@fosstodon.org avatar

@Mehrad @smach These things can be implemented without any changes in callr, you can already catch messages, warnings, etc. and write them to a separate file if you like.

FWIW. in practice we usually need the opposite, i.e. stdout and stderr merged together, in correct chronological order, the same way you'd see the output in a terminal.

Over time we realized that separating stdout and stderr (and messages, warnings, etc.) is not that useful because you cannot put them into a correct order.

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