zx8754's Avatar

zx8754

@zx8754.bsky.social

Analysis - Data - Analysis - Data - Volleyball - Father - #rstats #STEM #ProstateCancer

109 Followers  |  936 Following  |  133 Posts  |  Joined: 11.11.2023  |  2.4599

Latest posts by zx8754.bsky.social on Bluesky

#rstats easier to compare the ratios

08.10.2025 10:15 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

It had been gradually declining by about 5 million before the war, then dropped by another 5 million between 2022 and 2025.

08.10.2025 09:22 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
Tuzla Municipality: Stop at the Crosswalk, Stop the Accidents β€’ Ads of the Worldβ„’ | Part of The Clio Network What if a pedestrian crossing could tell the story of every accident that happened on it? In Tuzla, Istanbul, the stripes of a crosswalk were transformed into a living accident chart. Each line visua...

Looks like it is real - www.adsoftheworld.com/campaigns/st...

I understand the awareness function, but I'd rather see humped crossings or traffic calming measures before the crossings. The issue isn't visibility, it's the driving culture of ignoring them that needs to change.

01.10.2025 11:10 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

one day I will never master these

08.09.2025 06:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
"Hence, in the R Core meetings in Toulouse in 2019, it was decided to move towards using stringsAsFactors = FALSE by default, ideally starting with the 4.0.0 release."

"Hence, in the R Core meetings in Toulouse in 2019, it was decided to move towards using stringsAsFactors = FALSE by default, ideally starting with the 4.0.0 release."

Blame these guys πŸ€ͺ

blog.r-project.org/2020/02/16/s...

05.09.2025 07:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Screenshot of the answer at: https://unix.stackexchange.com/a/153662/16560

Screenshot of the answer at: https://unix.stackexchange.com/a/153662/16560

Ah, thought it was a hidden joke from devs, but it isn't

unix.stackexchange.com/a/153662/16560

05.09.2025 07:50 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1
Post image

I use Google as calculator, too. But recently discovered that the iPhone Notes app does the same:

04.09.2025 20:08 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Create a data.table row-wise
Aliases: rowwiseDT

Keywords:

### ** Examples

rowwiseDT(
  A=,B=, C=,
  1, "a",2:3,
  2, "b",list(5)
)
       A      B      C
   <num> <char> <list>
1:     1      a    2,3
2:     2      b      5

Create a data.table row-wise Aliases: rowwiseDT Keywords: ### ** Examples rowwiseDT( A=,B=, C=, 1, "a",2:3, 2, "b",list(5) ) A B C <num> <char> <list> 1: 1 a 2,3 2: 2 b 5

You can define a tibble row-by-row with tribble():

tribble(
  ~x, ~y,  ~z,
  "a", 2,  3.6,
  "b", 1,  8.5
)
#> # A tibble: 2 Γ— 3
#>   x         y     z
#>   <chr> <dbl> <dbl>
#> 1 a         2   3.6
#> 2 b         1   8.5

You can define a tibble row-by-row with tribble(): tribble( ~x, ~y, ~z, "a", 2, 3.6, "b", 1, 8.5 ) #> # A tibble: 2 Γ— 3 #> x y z #> <chr> <dbl> <dbl> #> 1 a 2 3.6 #> 2 b 1 8.5

#rstats #TIL I knew about tibble::tribble, but just discovered data.table::rowwiseDT.

"creates a data.table object by specifying a row-by-row layout. This is convenient and highly readable for small tables."

02.09.2025 06:49 β€” πŸ‘ 5    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
ggfun: Miscellaneous Functions for 'ggplot2' Useful functions and utilities for 'ggplot' object (e.g., geometric layers, themes, and utilities to edit the object).

It’s from ggfun: cran.r-project.org/package=ggfun

02.09.2025 04:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
ggfun: Miscellaneous Functions for 'ggplot2' Useful functions and utilities for 'ggplot' object (e.g., geometric layers, themes, and utilities to edit the object).

Looks like it is from ggfun package. Thanks for looking into this.

cran.r-project.org/package=ggfun

01.09.2025 13:44 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

update: Searching GitHub R repos gives 1.5K hits. Looking at couple of pages, it looks like it is from ggfun - cran.r-project.org/web/packages...

01.09.2025 13:30 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yes, checked the magrittr, too, nothing.

01.09.2025 13:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I'm afraid there’s no context, it comes from another user in a private group chat. I've asked for clarification and will provide an update once they respond with more info.

01.09.2025 09:22 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

#rstats pipe help, where is this from? I am guessing it is "modify and re-assign".

%<+%

Google didn't help, Gemini says it is invalid R code or it is a regex. ChatGPT says it is from ggplot, searching GitHub didn't help. But found this function ggplot2::`%+replace%`(), are they related?

01.09.2025 07:48 β€” πŸ‘ 5    πŸ” 1    πŸ’¬ 3    πŸ“Œ 0

They like to keep us floored.

18.08.2025 12:15 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

ggpairs for first 4 PCs would be interesting to see.

24.07.2025 09:12 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
# for loop
f <- function(x, y){
  out <- vector("integer", length(x))
  yy <- y
  for(i in seq_along(x)) {
    mm <- match(x[ i ], yy)
    out[ i ] <- mm
    yy[ mm ] <- NA
  }
  out
}
# recursive version
fr <- function(x, y, out = integer(length(x)), i = 1) {
  if (i > length(x)) return(out)
  
  mm <- match(x[ i ], y)
  out[ i ] <- mm
  if (!is.na(mm)) y[ mm ] <- NA
  
  fr(x, y, out, i + 1)
}

f(c("a", "b", "a"), c("a", "b", "c", "a"))
# [1] 1 2 4
fr(c("a", "b", "a"), c("a", "b", "c", "a"))
# [1] 1 2 4

# for loop f <- function(x, y){ out <- vector("integer", length(x)) yy <- y for(i in seq_along(x)) { mm <- match(x[ i ], yy) out[ i ] <- mm yy[ mm ] <- NA } out } # recursive version fr <- function(x, y, out = integer(length(x)), i = 1) { if (i > length(x)) return(out) mm <- match(x[ i ], y) out[ i ] <- mm if (!is.na(mm)) y[ mm ] <- NA fr(x, y, out, i + 1) } f(c("a", "b", "a"), c("a", "b", "c", "a")) # [1] 1 2 4 fr(c("a", "b", "a"), c("a", "b", "c", "a")) # [1] 1 2 4

24.07.2025 09:00 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Smells like recursive.

24.07.2025 08:18 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Challenge: check if you wish but do no reply to any work emails.

24.07.2025 07:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
paletteer_c("grDevices::Earth", 30)

https://r-charts.com/color-palettes/

paletteer_c("grDevices::Earth", 30) https://r-charts.com/color-palettes/

I think they are called Earthy colours

24.07.2025 07:34 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Image source: https://blogs.sas.com/content/sastraining/2019/01/24/re-creating-a-hans-rosling-graph-animation-with-sas/

Hans Rosling bubble chart presentation TED Talks:
The best stats you've ever seen | Hans Rosling
https://www.youtube.com/watch?v=hVimVzgtD6w

Image source: https://blogs.sas.com/content/sastraining/2019/01/24/re-creating-a-hans-rosling-graph-animation-with-sas/ Hans Rosling bubble chart presentation TED Talks: The best stats you've ever seen | Hans Rosling https://www.youtube.com/watch?v=hVimVzgtD6w

22.07.2025 08:50 β€” πŸ‘ 11    πŸ” 3    πŸ’¬ 1    πŸ“Œ 0
library(dplyr)

df1 |>
  mutate(mycol1 = "too") |>
  mutate(mycol2 = "much") |>
  mutate(mycol3 = "typing")

df1 |>
  mutate(mycol1 = "this",
         mycol2 = "is",
         mycol3 = "less")

library(dplyr) df1 |> mutate(mycol1 = "too") |> mutate(mycol2 = "much") |> mutate(mycol3 = "typing") df1 |> mutate(mycol1 = "this", mycol2 = "is", mycol3 = "less")

Similarly, long long time ago, I realised mutate can be called just once πŸ€¦β€β™‚οΈ

21.07.2025 07:43 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

As base::rbind also takes more than two dataframes as input, I expected at least the same from dplyr::bind_rows. And bind_rows handles rownames, factor levels, and mismatched column names better. #rstats

21.07.2025 07:37 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
> usedRegexN == hadToReLearnRegexN
[1] TRUE

> usedRegexN == hadToReLearnRegexN [1] TRUE

18.07.2025 08:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Just don't print them, you will most definitely never read those.

17.07.2025 07:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

We have to stop making babies and stop the muggers, too.

17.07.2025 07:46 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
GitHub - kingfish777/kitchenSink: integrating join prior from bioinformatics data with posteriors from observational data (EHR) to build DAGs/bayesian networks/models of mechanistic causality integrating join prior from bioinformatics data with posteriors from observational data (EHR) to build DAGs/bayesian networks/models of mechanistic causality - kingfish777/kitchenSink

Yeah, I was googling...

github.com/kingfish777/...

17.07.2025 07:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Shattered Britain This report - drawing on polling of over 20,000 people and dozens of focus groups around the country explores what is driving this sense of malaise, and how Britons see the path out of it. It explores...

For those searching for high-res version, the plot is from Executive Summary PDF file.

www.moreincommon.org.uk/our-work/res...

16.07.2025 10:18 β€” πŸ‘ 2    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
1KGP super-population assignment. The first three PCs plotted for each of the 5 1KGP super-populations with Mahalanobis distance outliers marked in black.

Figure 1b from https://pmc.ncbi.nlm.nih.gov/articles/PMC5646819/

1KGP super-population assignment. The first three PCs plotted for each of the 5 1KGP super-populations with Mahalanobis distance outliers marked in black. Figure 1b from https://pmc.ncbi.nlm.nih.gov/articles/PMC5646819/

In genetics we use Mahalanobis to assign/guess the population, e.g.:

pmc.ncbi.nlm.nih.gov/articles/PMC...

15.07.2025 12:55 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Post image 15.07.2025 07:23 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@zx8754 is following 20 prominent accounts