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 #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

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

Posit, to random
@Posit@fosstodon.org avatar

We’re thrilled to announce dplyr powered by DuckDB: duckplyr 🎉

A collaboration between the dplyr project team at Posit, cynkra, and DuckDB, duckplyr is a powerful new option that marries the user-friendly dplyr syntax with the execution capabilities of DuckDB.

Learn more: https://posit.co/blog/duckplyr-dplyr-powered-by-duckdb/

#tidyverse #RStats #duckdb #sql #dplyr

joranelias, to random
@joranelias@mastodon.social avatar

One could probably write a fairly popular & successful pkg that does nothing but wrap join functions and implements all the sundy bells & whistles from FRs that pop up over & over.

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

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

image/png

MattCrumpLab, to random
@MattCrumpLab@fosstodon.org avatar

{midiblender} continues to blend ::no emoji for blender, what?::

This morning I added some style functions for style composition, as well as more explicit row-by-row midi file declaration.

Testing them out in this blog post.

https://homophony.quest/blog/46_2_12_24_dplyr_midi/

jemsu, to random
@jemsu@norden.social avatar

Petition for to export dplyr::fitler because I'm bad at typing.

brodriguesco, to python
@brodriguesco@fosstodon.org avatar

No disrespect to Wes McKinney (I don’t like , but I personally could have never done something like that myself), but there’s literally 0 reason (apart from running legacy code) to use now when there’s on . With , is still the GOAT

samfirke,

@brodriguesco having used both I'll say is lightyears behind for data analysis, it's brutal

StatisticsGlobe, to datascience

As a little teaser for my upcoming online course, I'll be releasing a free video series on related topics on the Statistics Globe YouTube channel during the next few days!

First video: https://www.youtube.com/watch?v=XGBjyUmeMW8

jrosell, to random
@jrosell@mastodon.social avatar

What is the most underrated package and why is dbplyr?

rdnielsen,

@jrosell - The most underrated package is because it allows you to just write instead of using a double handful of functions. And if you have a database connection, there also you can just write SQL instead of using . Sqldf massively simplifies data wrangling relative to base R or tidyverse functions.

thadryanjs, to datascience

(1/n) Heads up/PSA/reminder for stats folks.

Almost misinformed my PI about a key variable the other day after stumbling into this little bit of computational profanity:

@academicsunite

thadryanjs,

(3/n) @academicsunite

It's worth noting that both and will save you from this. I prefer the .

image/png

hfrick, to random
@hfrick@mastodon.social avatar

And so it begins!

romainfrancois,

@hfrick thanks again for the bracelet, it arrived right on time.

d2ns, to random

Phew, had a really productive but exhausting day today. It's a report that works with and and I created something like a "create_graph()" function, because the graphs a very similar and it saves a lot of copy paste.

I really want to make one thing clear: Without and and and all things #R I could not do my job. Neither Excel, nor Stata, nor SPSS could help in that specific way. I wouldn't get anything of the non-data tasks done...

ogrisel, to random
@ogrisel@sigmoid.social avatar

Yesterday I learned at the tutorial that Ibis now offers an implementation of the across function first introduced in to conveniently and concisely apply transformations on a set of columns defined by selectors (e.g. based on column data types or name patterns).

This is especially convenient to implement scalable, in-DB feature engineering for machine learning models.

More examples in these blog post:

https://ibis-project.org/blog/selectors/

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

racketlang, to badminton
@racketlang@functional.cafe avatar

RacketCon presentation “Sawzall: A grammar for chopping up data”

by @hazel

Sawzall, inspired heavily by dplyr and the relational algebra. Sawzall builds on top of Alex Harsanyi’s data-frame package, but provides a set of operations that are designed to compose and avoid mutating the original data-set, leading to a natural style of data manipulation following the idea of "do this, then that".

Find more great presentations and details of RacketCon 2023 at https://con.racket-lang.org/

Sawzall: A grammar for chopping up data

https://youtu.be/zza0fb36c-U
https://docs.racket-lang.org/sawzall/index.html

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
  • JUstTest
  • mdbf
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • tester
  • InstantRegret
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • lostlight
  • All magazines