stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🔍 Quick Guide: Detecting Strings in R

In my latest blog post, I cover how to find specific strings in data columns using the str_detect function from the stringr package and base R functions. You'll see practical examples with both grepl for identifying matches and gregexpr for counting occurrences.

Read more here: https://www.spsanderson.com/steveondata/posts/2024-05-10/ and explore ways to make string detection a breeze in your data work!

#R

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Learn efficient ways to collapse text by group in R! Explore base R's aggregate(), dplyr's group_by() and summarise(), and data.table's grouping. Mastering these techniques enhances data preprocessing skills. Try these examples with your datasets to optimize workflows. Happy coding! 📊💻

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-05-09/

image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

👍 In R, you can easily extract specific columns from a data frame by their numerical positions. For instance, to grab the second column from a data frame df, you can use df[, 2].

🙅‍♂️ You can also exclude columns by using negative indexing, such as df[, -2] to exclude the second column.

Keep exploring and happy coding!

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-05-08/

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Counting NA's across columns in #R sure you can do that!!

My post today uses #BaseR #dplyr and #datatable to accomplish this

#R #Rstats #RProgramming #Coding #Programming #Data #DataScience

Post: https://www.spsanderson.com/steveondata/posts/2024-05-07/

image/png
image/png
image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Today I am writing on the AIC functions available in my hashtag#R hashtag#Package TidyDensity.

There are many of them, with many more on the way. Some of them are a little temperamental but not to worry it will all be addressed.

My approach is different then that of fitdistrplus which is an amazing package. I am trying to forgo the necessity of supplying a start list where it may at times be required.

Post: https://www.spsanderson.com/steveondata/posts/2024-05-06/

#R

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

working on the next release of TidyDensity

#R

stevensanderson,
@stevensanderson@mstdn.social avatar
stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Want a simple form of analysis in #R well, I got you covered.

My #R TidyDensity has a function called tidy_mcmc_sampling() that is pretty straight forward. It takes a raw vector and performs the calculation you give it over a default of 2k samples.

I hope you find it useful.

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-05-03/

image/png
image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Exciting news for R users! TidyDensity's latest update introduces util_chisquare_param_estimate(), leveraging MLE to estimate Chi-square distribution parameters like dof and ncp.

Generate a dataset with rchisq() and use util_chisquare_param_estimate() to analyze it, even without knowing the underlying distribution. Visualize results with tidy_combined_autoplot().

Try it in your next R project!

Post: https://www.spsanderson.com/steveondata/posts/2024-05-02/

#R

image/png
image/png
image/png

geekymalcolm, to random
@geekymalcolm@ioc.exchange avatar
stevensanderson, to programming
@stevensanderson@mstdn.social avatar
stevensanderson, to random
@stevensanderson@mstdn.social avatar

Exciting news! 🚀 TidyDensity version 1.4.0 is here.

  • Quantile normalization to handle skewed data distributions
  • Duplicate row detection for improved data quality
  • Chi-square distribution parameter estimation made easy
  • Markov Chain Monte Carlo (MCMC) sampling for advanced analysis
  • AIC calculations for model selection

R

I will do tutorials of new functionality during the week.

Post: https://www.spsanderson.com/steveondata/posts/2024-04-29/

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Discover efficient string splitting in R using strsplit()!

Learn practical examples and unleash the power of regular expressions.

Enhance your data cleaning skills and level up your R programming.

Experiment with strsplit() today!

Post: https://www.spsanderson.com/steveondata/posts/2024-04-26/

#DataAnalysis #DataScience #RProgramming #R #RStats #Programming #Coding

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

My #R has been submitted to CRAN for version 1.4.0

Lots of good stuff in this one!

#R

https://github.com/spsanderson/TidyDensity/blob/master/NEWS.md

jumpingrivers, to datascience
@jumpingrivers@fosstodon.org avatar

📣 Exciting news, everyone! 🌟 Make sure to head over to this weeks blog "What's new in R 4.4.0?" by Russ Hyde, and dive into the world of the latest R release📊🔬💻

Discover some of the amazing new features that this version has to offer! 🔍 🔭 🚀


https://www.jumpingrivers.com/blog/whats-new-r44/

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Master data manipulation in R by dropping unnecessary columns from data frames using simple methods like the $ operator, subset() function, and dplyr package's select() function.

Try these techniques on your own datasets for efficient data cleaning and analysis!

Post: https://www.spsanderson.com/steveondata/posts/2024-04-25/

#R

stevensanderson, to programming
@stevensanderson@mstdn.social avatar
stevensanderson, to random
@stevensanderson@mstdn.social avatar

Today's topic is: Identifying Common Rows Between Data Frames in R

In data analysis, comparing datasets is crucial. A common task is checking if rows from one data frame exist in another. I have had to do this myself many times.

Today I discuss the following:

1️⃣ The merge() Function

2️⃣ The %in% Operator

For a step-by-step guide and examples, check out the full blog post.

Link: https://lnkd.in/eDRvYr6C

#R

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🔍 How to Extract Last Row in Data Frame in R

Base R
Use nrow(my_df) to get the total rows.
Extract the last row with indexing: my_df[nrow(my_df), ].

dplyr
Use tail(my_df, 1) to get the last row.

data.table
Convert to data.table: my_dt <- as.data.table(my_df).
Get last row using .N: my_dt[.N].

Now you know three ways to extract the last row. Try it yourself! 📊

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-04-18/

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

I had previously discussed how to drop those pesky NA records from your data.frame but now, what if you actually want to inspect them? That is what I cover in today's post.

Post: https://www.spsanderson.com/steveondata/posts/2024-04-17/

#R

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Need to Find Rows with a Specific Value (Anywhere!) in R?

Ever have a large R data table where you need rows containing a specific value, but you're not sure which column it's in? We've all been there! Here's a quick guide to tackle this using both dplyr and base R functionalities.

🌟 The dplyr Way: Streamlined Selection

🌟 Base R to the Rescue: Manual Looping

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-04-16/

stevensanderson, (edited ) to programming
@stevensanderson@mstdn.social avatar

Estimating the degrees of freedom 'k' and the non-centrality 'ncp' parameters of the chi-square distribution from just a vector of numbers? I think I am there. Here is a post the work I did over the last couple of days:

Post: https://www.spsanderson.com/steveondata/posts/2024-04-15/

#R #RStats #RProgramming #Programming #Coding #Statistics #Distributions #Programming

stevensanderson, to github
@stevensanderson@mstdn.social avatar
stevensanderson,
@stevensanderson@mstdn.social avatar

@ramikrispin I think this is it. The Mega Test Scrip creates 1000 different combinations of the rchisq() data and runs it all using different approachs

https://github.com/spsanderson/TidyDensity/issues/414#issuecomment-2053657200

#R

stevensanderson, to RegEx
@stevensanderson@mstdn.social avatar

I decided to make a blog post out of a problem I worked on a day or two ago and thankfully I was also pointed to another solution from @embiggenData which worked well too.

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-04-12/

image/png
image/png

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