stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Want to split numbers up, because why not? I go over this in todays post using gsub() and strsplit() functions from base R.

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

#R

image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

🚀 Elevate Your R Programming Skills: Removing Elements from Vectors

Want to level up your R programming game? Let's talk about removing specific elements from vectors! It's a fundamental skill.

But here's the real fun: try it yourself! Experiment with your own data and see which method resonates with you. To get yourself familiar with what's happening, you have to experiment.

#R #RStats #RProgramming #Data #DataFiltering #dplyr #datatable #baser

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

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🔎 Selecting Columns Containing a Specific String in R: A Quick Guide 🚀

Hey R users! Need to select columns by a specific string? Here's how in base R, stringr, stringi, dplyr, and with a bonus from data.table.

🆒 R
✅ grepl
📦 stringr
📦 stringi
📦 dplyr

Bonus: 📦 data.table
library(data.table)
df_price <- df[, names(df) %like% "price"]

Happy coding! 🚀

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

#R

image/png
image/png
image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Want to check duplicate values across columns of a data.frame? Well you can do that in a basic way with TidyDensity and the check_duplicate_rows() function, or you can go through todays blog post for some other ideas with and

#R

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

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 and to accomplish this

#R

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

image/png
image/png
image/png

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! 📊

#RProgramming #DataFrames #CodingTips #R #RStats #Programming #Coding #Data #datatable #dplyr #baseR

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

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, to programming
@stevensanderson@mstdn.social avatar

Ever heard of the sweep() function from ? Well today it is the topic of my latest blog post!

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

#R

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Level up your data wrangling! Learn how to add index columns in R – both base & tidyverse Choose your weapon & customize! Ready to try? Create your own data frame & experiment! Share your creations & challenges!

#R #RStats #RProgramming #Programming #BaseR #dplyr #tibble

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

image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Wrangling dates in R got you pulling your hair? ⏱️ Time travel to mastery with these 3 powerful tools:

Base R's seq.Date: Your daily/weekly/monthly hero.
lubridate's seq: Filter magic for specific weekdays. Analyze those Tuesdays!
timetk's tk_make_timeseries: Define complex sequences in a simple table. Easy time travel!

#R #RStats #RProgramming #Programming #DateSequence #TimeSeries #lubridate #timetk #baseR

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

image/png
image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Drowning in daily data? Conquer weekly analysis with R's strftime() magic! Extract ISO week numbers & group your data like a pro. Ready to level up? Explore "U" for Sunday starts & packages for more grouping power. Challenge: calc weekly averages, peak sales, etc. Share your data wrangling wins in the comments!

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

#R

image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

📈🌿 Dive into Data Visualization with Base R! 🌿📈

Discover the power of creating striking linear model plots with confidence intervals using the iconic Iris dataset—all with base R! 🌼🚀

Give it a try and embark on your data science journey. 🚀📊

Happy coding! 🌱📊

Post: https://www.spsanderson.com/steveondata/posts/2023-09-22/

image/png
image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Imagine you have a bunch of data points and you want to know how many belong to different categories. This is where grouped counting comes in. We've got three fantastic methods for you to explore, each with its own flair: aggregate(), dplyr, and data.table.

Happy counting, fellow data explorer! 🎉🔍 #DataAnalysis #RProgramming #ExploreData #dplyr #aggregate #baser #r #rstats #datatable

Post: https://www.spsanderson.com/steveondata/posts/2023-08-10/

image/png
image/png

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

I encourage you to roll up your sleeves and give it a try yourself. 💪🔍

Read the full blog post and start your exploration. Let's dive in and level up your data analysis game! 🚀📊

https://www.spsanderson.com/steveondata/posts/2023-07-17/

#Rprogramming #DataAnalysis #DuplicatesDetection #dplyr #BaseR #DataManipulation

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