#RProgramming

Steven Sandersonspsanderson@rstats.me
2025-05-15

Same as yesterday, but this time, making a 2D Discrete Random Walk with my #R #Package #RandomWalker

#R #RStats #RProgramming #RandomWalks #Visual #ggplot2

A scatterplot titled "2D Random Walks with Outliers Highlighted." It shows multiple colored random walk paths in a 2D space, with outliers prominently highlighted in bold red dashed lines. Non-outliers are displayed in lighter colors. Black dashed horizontal and vertical lines indicate threshold boundaries for outlier detection. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y."A scatterplot titled "2D Random Walk Outliers Only." It showcases only the outlier random walk paths in a 2D space, displayed in various colors on a white background. Black dashed horizontal and vertical lines mark the threshold boundaries for outlier detection. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y."A scatterplot titled "2D Random Walk Non-Outliers Only." It displays multiple colored linear paths representing random walks in a 2D space, constrained to non-outlier data points. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y." The paths are laid out in a grid-like pattern with varied colors.A screenshot of R programming code written for generating 2D random walks, analyzing outliers, and plotting results. The code uses libraries such as RandomWalker, dplyr, ggplot2, and tidyr. It calculates confidence intervals, identifies outliers, and generates three types of plots: non-outliers, outliers, and highlighted outliers. The syntax is color-coded, with comments explaining each step.
Steven P. Sanderson II, MPHstevensanderson@mstdn.social
2025-05-15

Same as yesterday, but this time, making a 2D Discrete Random Walk with my #R #Package #RandomWalker

#R #RStats #RProgramming #RandomWalks #Visual #ggplot2

A scatterplot titled "2D Random Walk Non-Outliers Only." It displays multiple colored linear paths representing random walks in a 2D space, constrained to non-outlier data points. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y." The paths are laid out in a grid-like pattern with varied colors.A scatterplot titled "2D Random Walks with Outliers Highlighted." It shows multiple colored random walk paths in a 2D space, with outliers prominently highlighted in bold red dashed lines. Non-outliers are displayed in lighter colors. Black dashed horizontal and vertical lines indicate threshold boundaries for outlier detection. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y."A scatterplot titled "2D Random Walk Outliers Only." It showcases only the outlier random walk paths in a 2D space, displayed in various colors on a white background. Black dashed horizontal and vertical lines mark the threshold boundaries for outlier detection. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y."A screenshot of R programming code written for generating 2D random walks, analyzing outliers, and plotting results. The code uses libraries such as RandomWalker, dplyr, ggplot2, and tidyr. It calculates confidence intervals, identifies outliers, and generates three types of plots: non-outliers, outliers, and highlighted outliers. The syntax is color-coded, with comments explaining each step.
Steven Sandersonspsanderson@rstats.me
2025-05-14

Generate and visualize a Two Dimensional Random Walk in #R with #RandomWalker

#R #RStats #RProgramming #Code

A 2D scatter plot titled "2D Random Walk Non-Outliers Only," showing multiple random walk trajectories in various colors. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y." The trajectories are concentrated around the origin and do not include any outliers.A 2D scatter plot titled "2D Random Walk Outliers Only," depicting random walk trajectories in various colors. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y." Black dashed lines mark boundary limits, highlighting walks identified as outliers that extend beyond the main cluster.A 2D scatter plot titled "2D Random Walks with Outliers Highlighted," combining both non-outlier and outlier trajectories. Non-outlier walks are displayed in various colors, while outliers are highlighted in bold red dashed lines. Black dashed lines denote confidence interval boundaries, and the x-axis and y-axis are labeled "Cumulative Sum X" and "Cumulative Sum Y," respectively.A screenshot of an R script for generating and visualizing 2D random walks. The code uses the RandomWalker, dplyr, and ggplot2 libraries to compute random walks, identify outliers, and plot results. Key sections include calculating confidence intervals, filtering outliers, and creating customized plots with distinct visual styling for outliers and non-outliers.
Steven P. Sanderson II, MPHstevensanderson@mstdn.social
2025-05-14

Generate and visualize a Two Dimensional Random Walk in #R with #RandomWalker

#R #RStats #RProgramming #Code

A 2D scatter plot titled "2D Random Walks with Outliers Highlighted," combining both non-outlier and outlier trajectories. Non-outlier walks are displayed in various colors, while outliers are highlighted in bold red dashed lines. Black dashed lines denote confidence interval boundaries, and the x-axis and y-axis are labeled "Cumulative Sum X" and "Cumulative Sum Y," respectively.A 2D scatter plot titled "2D Random Walk Outliers Only," depicting random walk trajectories in various colors. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y." Black dashed lines mark boundary limits, highlighting walks identified as outliers that extend beyond the main cluster.A 2D scatter plot titled "2D Random Walk Non-Outliers Only," showing multiple random walk trajectories in various colors. The x-axis is labeled "Cumulative Sum X," and the y-axis is labeled "Cumulative Sum Y." The trajectories are concentrated around the origin and do not include any outliers.A screenshot of an R script for generating and visualizing 2D random walks. The code uses the RandomWalker, dplyr, and ggplot2 libraries to compute random walks, identify outliers, and plot results. Key sections include calculating confidence intervals, filtering outliers, and creating customized plots with distinct visual styling for outliers and non-outliers.
Journal of Plant Ecologyjpecol
2025-05-13
The references to the most widely utilized R packages (appearing in over 100 articles) across the eight top forestry journals from 2013 to 2022.
Steven Sandersonspsanderson@rstats.me
2025-05-12

If you want to use the C5.0 #algorithm for #Classification you might want to make sure your data is in the right format.

Let my #R package healthyR.ai help you get there.

See an example here: spsanderson.com/healthyR.ai/re

#R #RProgramming #parsnip #C50 #tips #Rtips

library(ggplot2)
library(tibble)

Titanic <- as_tibble(Titanic)

hai_c50_data_prepper(.data = Titanic, .recipe_formula = Survived ~ .)
#> 
#> ── Recipe ──────────────────────────────────────────────────────────────────────
#> 
#> ── Inputs 
#> Number of variables by role
#> outcome:   1
#> predictor: 4
#> 
#> ── Operations 
#> β€’ Factor variables from: tidyselect::vars_select_helpers$where(is.character)
rec_obj <- hai_c50_data_prepper(Titanic, Survived ~ .)
get_juiced_data(rec_obj)
#> # A tibble: 32 Γ— 5
#>    Class Sex    Age       n Survived
#>    <fct> <fct>  <fct> <dbl> <fct>   
#>  1 1st   Male   Child     0 No      
#>  2 2nd   Male   Child     0 No      
#>  3 3rd   Male   Child    35 No      
#>  4 Crew  Male   Child     0 No      
#>  5 1st   Female Child     0 No      
#>  6 2nd   Female Child     0 No      
#>  7 3rd   Female Child    17 No      
#>  8 Crew  Female Child     0 No      
#>  9 1st   Male   Adult   118 No      
#> 10 2nd   Male   Adult   154 No      
#> # β„Ή 22 more rows
Steven P. Sanderson II, MPHstevensanderson@mstdn.social
2025-05-12

If you want to use the C5.0 #algorithm for #Classification you might want to make sure your data is in the right format.

Let my #R package healthyR.ai help you get there.

See an example here: spsanderson.com/healthyR.ai/re

#R #RProgramming #parsnip #C50 #tips #Rtips

library(ggplot2)
library(tibble)

Titanic <- as_tibble(Titanic)

hai_c50_data_prepper(.data = Titanic, .recipe_formula = Survived ~ .)
#> 
#> ── Recipe ──────────────────────────────────────────────────────────────────────
#> 
#> ── Inputs 
#> Number of variables by role
#> outcome:   1
#> predictor: 4
#> 
#> ── Operations 
#> β€’ Factor variables from: tidyselect::vars_select_helpers$where(is.character)
rec_obj <- hai_c50_data_prepper(Titanic, Survived ~ .)
get_juiced_data(rec_obj)
#> # A tibble: 32 Γ— 5
#>    Class Sex    Age       n Survived
#>    <fct> <fct>  <fct> <dbl> <fct>   
#>  1 1st   Male   Child     0 No      
#>  2 2nd   Male   Child     0 No      
#>  3 3rd   Male   Child    35 No      
#>  4 Crew  Male   Child     0 No      
#>  5 1st   Female Child     0 No      
#>  6 2nd   Female Child     0 No      
#>  7 3rd   Female Child    17 No      
#>  8 Crew  Female Child     0 No      
#>  9 1st   Male   Adult   118 No      
#> 10 2nd   Male   Adult   154 No      
#> # β„Ή 22 more rows
Steven Sandersonspsanderson@rstats.me
2025-05-05

🎯 Level up your R functions! Discover best practices for returning multiple values - from simple vectors to structured outputs. Perfect for data pipeline development.

πŸ”— spsanderson.com/steveondata/po

#rstats #Rprog #Rcode #DataSci #R4ds #blog #function #RProgramming

🎯 Level up your R functions! Discover best practices for returning multiple values - from simple vectors to structured outputs. Perfect for data pipeline development.

πŸ”— https://www.spsanderson.com/steveondata/posts/2025-05-05/

#rstats #Rprog #Rcode #DataSci #R4ds #blog #function #RProgramming
Steven P. Sanderson II, MPHstevensanderson@mstdn.social
2025-05-05

🎯 Level up your R functions! Discover best practices for returning multiple values - from simple vectors to structured outputs. Perfect for data pipeline development.

πŸ”— spsanderson.com/steveondata/po

#rstats #Rprog #Rcode #DataSci #R4ds #blog #function #RProgramming

🎯 Level up your R functions! Discover best practices for returning multiple values - from simple vectors to structured outputs. Perfect for data pipeline development.

πŸ”— https://www.spsanderson.com/steveondata/posts/2025-05-05/

#rstats #Rprog #Rcode #DataSci #R4ds #blog #function #RProgramming
2025-04-30

Β‘Reto #30DayChartChallenge 2025 COMPLETADO! πŸŽ‰πŸ“Š 30 dΓ­as, 30 visualizaciones con #RStats y #ggplot2.

Ha sido un viaje increΓ­ble explorando comparaciones, distribuciones, relaciones (Β‘animales!), series temporales (sociales, econΓ³micas) e incertidumbre (riesgo, exoplanetas, mapas...).

Puedes ver la galerΓ­a completa (y todo el cΓ³digo) en mi repositorio:
πŸ“‚ github.com/michal0091/dataviz/

Β‘Gracias por seguir el reto! #dataviz #DataVisualization #DataStorytelling #ChallengeComplete #Rprogramming

PDF con recopilaciΓ³n del reto de #30DayChartChallenge
Statistics GlobeStatisticsGlobe
2025-04-22

If you're still using raw R outputs for presentations, it's time for an upgrade! Tools like gtsummary bring your statistical results to life, making them much more digestible for non-technical audiences.

The visualization included here was originally shared in a post by Dr. Alexander Krannich. Thanks to Alexander for inspiring me to create this post.

More details are available at this link: eepurl.com/gH6myT

Steven Sandersonspsanderson@rstats.me
2025-04-18

Getting the medical policies

#R #rprogramming #programming #blog

#### ALT Text Description

A screenshot of R programming code displayed in a code editor. The code utilizes the `httr2` and `tidyverse` libraries to perform a GET request to a specified JSON URL, extract relevant data, and filter for PDF filenames. The last step involves downloading the first PDF file from the extracted data. The code is structured with comments indicating each step of the process. The background of the code editor is a light blue gradient.
Steven P. Sanderson II, MPHstevensanderson@mstdn.social
2025-04-17

@wronglang I also see that when I use rvest and the read_html() function it just goes on and on. so strange. maybe I need an RSelenium approach

#R #RStats #Web #RProgramming #rvest #tidyverse

2025-04-11

New version of R is out!

Our Data Scientist, Russ Hyde, has put together a quick review of the key features and changes in R 4.5 β€” from new language features to graphics updates and more.

πŸ“ Read the full blog post here: jumpingrivers.com/blog/whats-n

#rstats #update #Rprogramming #datascience #opensource
jumpingrivers.com/blog/whats-n

Statistics GlobeStatisticsGlobe
2025-04-11

Handling missing data is a critical step in data analysis, as failing to address it properly can lead to biased results and reduced analytical power. The mice package for R, short for Multivariate Imputation by Chained Equations, provides a robust and flexible framework for handling missing values through multiple imputation.

The visualizations shown below originate from the package website: github.com/amices/mice

More info: eepurl.com/gH6myT

N-gated Hacker Newsngate
2025-04-10

πŸ’πŸ“š Ah, the "Big Book of R"β€”a tome so comprehensive it could double as a doorstop or a weapon in a pinch. It's like someone took the syllabus of every course ever offered in R and threw them into a blender, producing the world's most overwhelming smoothie. πŸ₯€πŸš€ Who needs concise when you can have a category for every letter of the alphabet, right? πŸ™„
bigbookofr.com/

Steven Sandersonspsanderson@rstats.me
2025-04-08

I have hear a link with a bunch of R related material. It is constantly updated:

app.dotadda.io/teams/bad2fd50-

#R #RProgramming #Programming #OpenSource #DoTadda #List #Blog

Steven P. Sanderson II, MPHstevensanderson@mstdn.social
2025-04-08

I have hear a link with a bunch of R related material. It is constantly updated:

app.dotadda.io/teams/bad2fd50-

#R #RProgramming #Programming #OpenSource #DoTadda #List #Blog

Steven Sandersonspsanderson@rstats.me
2025-03-31

πŸ’» Master while loops in R! Learn how to optimize performance, avoid common pitfalls, and write cleaner code. This guide is perfect for R programmers looking to enhance their skills.

🎯 Check it out: The Complete Guide to While Loops in R here: spsanderson.com/steveondata/po

#R #RStats #Programming #Data #Code #Blog #RProgramming

πŸ’» Master while loops in R! Learn how to optimize performance, avoid common pitfalls, and write cleaner code. This guide is perfect for R programmers looking to enhance their skills.

🎯 Check it out: The Complete Guide to While Loops in R here: https://www.spsanderson.com/steveondata/posts/2025-03-31/

#R #RStats #Programming #Data #Code #Blog #RProgramming

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst