stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

In base R, we can filter rows where a column is between two values using bracket notation or the subset() function along with logical operators like >=, <=, &, and !. The key is creating a logical test that checks if values are within our desired range.

For example, to filter rows where the column "value" is between 5 and 8

df[df$value >= 5 & df$value <= 8,]

Or with subset()

subset(df, value >= 5 & value <= 8)

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

#R

image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Need to visualize and scale multi-dimensional data? Well sometimes we do and this post is for you!

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

#R

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/

stevensanderson, to github
@stevensanderson@mstdn.social avatar
jromanowska, to delhi
@jromanowska@fosstodon.org avatar

Joint event by R-Ladies Cologne (@cosima_meyer and
Gabe Winter) and R-Ladies Bergen (Jonelle and me): we're thrilled to be hosting Mine Çetinkaya-Rundel who will teach us about Quarto 🥳 👩‍💻

This is a kick-off event for a brand-new book club, where we'll be going through the book "Building reproducible analytical pipelines with R". Come, join us!

https://www.meetup.com/rladies-bergen/events/295922921

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

📈 Unleash the power of robust regression in R! 🔄

Compare traditional lm() with robust rlm() using a dataset. Blue vs. red residuals visually unveil how each model handles outliers. Dive in, experiment with your data, and empower your coding journey! 💻

#R

Post: https://www.spsanderson.com/steveondata/posts/2023-11-28/

image/png
image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Got NA's in your data? Well, if you want to get rid of them then this post is for you!

#R

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

stevensanderson, to statistics
@stevensanderson@mstdn.social avatar

🔬📊 Mastering Data Grouping with R's ave() Function 📊🔬

Are you tired of manually calculating statistics for different groups in your data analysis projects? Look no further! R's ave() function is here to revolutionize your data grouping experience. 🚀

Post: https://www.spsanderson.com/steveondata/posts/2023-06-27/

#r

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Struggling with weird variable names in R? make.names to the rescue! This function wrangles your names into R-approved format (letters, numbers, periods, underscores). Bonus: set unique = TRUE for no duplicates! Try it on funky characters & data frames! 🪄 Master make.names and become an R name-wrangling pro! #R

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

image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Unleash Excel date power in R! Convert formats to proper dates effortlessly. With as.Date() & convertToDateTime(), transform data for smoother analysis. Dive into R, empower your data journey! Try it yourself & elevate your analysis game!

#R

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

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

🎉 New Post Alert! 🎉

Counting words in a string is a fundamental task in data analysis.

  1. Base R: Use strsplit(), a straightforward method to split strings and count words.

  2. stringr: The str_split() function from the stringr package makes the code more readable.

  3. stringi: For powerful and efficient string manipulation, stri_split_regex() from the stringi package is your go-to.

Happy coding! 🚀

#R

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

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Unveiling hidden treasures: Exploring government data with R!

This code dives into a treasure trove of government data, making it more accessible for you. Here's how it works:

Fetching Data: It grabs data from a government website using R's httr2 package.

This is just a glimpse of what R can do! With its powerful tools, you can unlock valuable insights from various data sources.

#R

image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

🚀 Unleash the Power of R Functions: get(), get0(), dynGet(), and mget()!

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

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Taming Your Data with Filtering in R

Feeling lost in your data jungle? Filtering is your machete!

Master data.tables:

  • Filter by conditions
  • Combine conditions
  • Filter by list values

Conquer data.frames:

  • Use logical operators
  • Subset with row indices

#R

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

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

working on the next release of TidyDensity

#R

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Learn how to set a data frame column as the index for faster data access and streamlined operations.

In R, utilize the setDT() function from or column_to_rownames() from to seamlessly set your desired column as the index. Try it out with your datasets and experience the boost in productivity!

#R 🚀📊

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

stevensanderson, to opensource
@stevensanderson@mstdn.social avatar

file_path <- "data.csv"
if (file.exists(file_path)) {
print("The file exists!")
} else {
print("The file does not exist.")
}

In this example, we check if the file named "data.csv" exists. Depending on the outcome, it will print either "The file exists!" or "The file does not exist."

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

#R

joncruz, to random
@joncruz@mstdn.social avatar

Anyone know of any good books to get a college sociology student up to speed on #R? For someone who is tech savvy but a non programmer.

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

I'll give you a quick rundown on creating horizontal boxplots in R using both base R and ggplot2. We'll work with the "palmerpenguins" dataset to keep things interesting!

🚀 Base R Approach (Simple and Quick)

🚀 ggplot2 Approach (More Customization)

Both methods have their advantages.

So, why not give it a try yourself?

#R

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

image/png
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 datascience
@stevensanderson@mstdn.social avatar

Looking to do some data filtering in base R? Well then of course I have a post for you! Many times people in a corporate environment are strapped from installing packages or it is cumbersome to get it done, this is why I like to focus on base R solutions.

#R

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

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! 🎉🔍 #r

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

image/png
image/png

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/

#R

image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

🚀 Unleash the power of regression in R! 🔍 Follow this quick guide: load data, visualize with a scatter plot, fit a power regression model using nls, add visual flair, and embrace uncertainty with prediction intervals. Ready to code? Dive in! 💻✨

#R

Post: https://www.spsanderson.com/steveondata/posts/2023-11-27/

image/png

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