Nick Tierney

@njtierney@aus.social
828 Followers
181 Following
523 Posts
|| Research Software Engineer at The Kids Research Institute Australia | Loves #rstats | Ultra-Runner | Hiker | Climber | Coffee Geek | Serial Hobbiest | he/him ||
bloghttps://njtierney.com/
githubhttps://github.com/njtierney
pronouncesHe/Him
pct bloghttps://njt.micro.blog/

OK #rstats team - explaining to new #rstats users a nice way to drop the first and last values of a vector is surprisingly tricky - something like this still feels a bit involved to new users, I'm curious what folks would use to teach? This feels a bit much:

```r
slice_middle <- function(x){
drop_last <- head(x, -1)
drop_first_and_last <- tail(drop_last, -1)
drop_first_and_last
}

slice_middle(1:10)
#> [1] 2 3 4 5 6 7 8 9
```

Ursula Franklin—technology thinker, physicist, metallurgist, Quaker, and committed pacifist—is one of the people whose work I return to the most when things are bad.

I *tried* to write about her great short checklist for making decisions about technology and I ended up writing a whole post about just the first item, which the real foundational one.

https://www.wrecka.ge/ursulas-list/

"The viability of technology, like democracy, depends in the end on the practice of justice…"

Ursula's list

Ursula Franklin is one of my all-time favorite thinkers about both the obvious and obscured parts of our technological world.

wreckage/salvage

🚨 After years of development, the new version of #rstats tmap (4) is now available on CRAN! 🎉 Huge thanks to author Martijn Tennekes and all contributors.

🔧 Install: `install.packages("tmap")`
📚 Vignettes: https://buff.ly/4aAYNbq
📖 Book Chapter: https://buff.ly/43TokaF

#maps #tmap #rspatial

Thematic Maps

Thematic maps are geographical maps in which spatial data distributions are visualized. This package offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps.

#RStats PSA: If you have updated RStudio to the latest 2024.12.0, a new field ProjectID will be added to your .Rproj file. This only needs to be committed to version control once, but you'll need all of your collaborators to also use the latest version (otherwise the field will be deleted, and it is randomly generated each time). See the Posit Community post below for more details:

https://forum.posit.co/t/use-for-projectid-in-rproj-file/196345

Use for ProjectId in .Rproj file?

I've noticed that the .Rproj files for some of my RStudio projects now have a ProjectId field, containing what looks like a 128 bit UUID. I assume this is a new feature of a recent RStudio release. I noticed it because I have committed the .Rproj files to Git, and it's reporting that the file has changed. Is there any documentation for how this field is being used? I'm wondering in particular about how it will work if I have coworkers on the same project. Should they use the same ProjectID,...

Posit Community

Luis asked why have I chosen to develop packages for Bayesian SVARs in R. This is why:

💝 I really like the format of R packages how it’s standardised and checked at the CRAN assuring quality.

💖 R was missing tools for SVARs and particularly on Bayesian SVARs. There were some such packages, but the literature and users’ needs are much broader.

💘 The core code for most of algorithms in our packages is written in C++ which is much faster.

👇

#rstats #bsvars #bsvarSIGNs #foss

I recall that the @Posit Conf call for papers was supposed to go live on Jan 10th but I don't see anything yet.

Anyone know about it 👀 #rstats

Joachim Schork on LinkedIn: #data #analysisskills #dataanalytic #database

Regression imputation is a powerful method for handling missing data by predicting missing values based on relationships with other variables. Two widely used approaches, deterministic regression imputation and stochastic regression imputation, differ in how they handle variability in the imputed values. Understanding these differences is essential for choosing the appropriate method for your analysis. 🔹 Deterministic regression imputation replaces missing values with the predicted values from a regression model. It is simple and easy to implement, ensuring consistency with the regression model's predictions. However, it fails to account for the natural variability in the data, as all imputed values lie directly on the regression line. This lack of variability can distort relationships in the data, reducing variability and underestimating standard errors. 🔹 Stochastic regression imputation builds on deterministic regression by adding random noise (from the regression model's residuals) to the predicted values. This approach preserves the natural variability in the data, introducing randomness that better reflects the true distribution of the variable with missing values. While it offers more realistic imputation results, it is slightly more complex to implement than deterministic regression. A Visual Comparison The attached image highlights the differences between deterministic and stochastic regression imputation. In the left panel, deterministic regression imputation is depicted, where all imputed values (red points) lie directly on the regression line. This lack of variability can result in unrealistic patterns in the data. In contrast, the right panel illustrates stochastic regression imputation, where imputed values include added noise from the regression model’s residuals. This approach better captures the natural variability observed in the data (black points), resulting in a more realistic representation. Which Method Should You Use? If your analysis requires preserving variability and maintaining accurate relationships between variables, stochastic regression imputation is generally the better choice. By introducing randomness that reflects the natural variability in the data, stochastic regression produces more realistic results and avoids the potential biases introduced by deterministic regression. For a step-by-step explanation of both methods, check out my full tutorial here: https://lnkd.in/e7zvYZe I’m thrilled to announce my online workshop on Missing Data Imputation in R, beginning February 20, limited to 15 participants. Learn more by visiting this link: https://lnkd.in/eXApSEBw #data #analysisskills #dataanalytic #database

{gdalraster} 1.12.0 released on CRAN, #rstats package for API bindings to GDAL. This is a minor version update containing a small number of new features and bug fixes.

Work continues toward a larger release that will add full bindings to the vector API along with several other enhancements.

Changelog: https://usdaforestservice.github.io/gdalraster/news/index.html#gdalraster-1120

#rspatial #gdal

Changelog

Introducing {mp4encoder} - an H.264/mp4 encoder for #RStats written in R itself!

https://github.com/coolbutuseless/mp4encoder

Features:
* Fast encoding e.g. 700fps for 800x600 native rasters
* Images may be RGB arrays or native rasters
* mp4 videos can be played on majority of OSs + browsers
* does not use 3rd party encoding libraries - meaning it will work anywhere you have R
* does all its encoding in R using {ctypesio} & {bitstreamio} for byte/bit manipulation

Caveat: it only writes uncompressed video

GitHub - coolbutuseless/mp4encoder: Encode h264 uncompressed video in mp4 container with R - low dependencies

Encode h264 uncompressed video in mp4 container with R - low dependencies - coolbutuseless/mp4encoder

GitHub
For WebR in #rstats, do we think we'll ever get to a place where wasm is an official build target for R?