@stevensanderson@mstdn.social
@stevensanderson@mstdn.social avatar

stevensanderson

@stevensanderson@mstdn.social

New Book: https://packt.link/oTyZJ | R - install.packages("healthyverse") | #SQL | opinions are mine | #rstats | Mainly though my wife and kids :) | Advisor to DoTadda - All posts delete in 12 months.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Correct title: FL Business that Exploited Labor is being legally forced out, mad at DeSantis for doing biz dirty.

https://www.npr.org/2024/04/26/1242236604/florida-economy-immigration-businesses-workers-undocumented

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

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Just finished a hair over 20 issues for my #R package 📦 for

video/mp4

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

unusual_whales, to news
@unusual_whales@masto.ai avatar

BREAKING: The Department of Transportation has issued a new rule requiring airlines to give you an automatic refund if your flight is canceled or delayed or if they lose your bags, per MorePerfectUnion

stevensanderson,
@stevensanderson@mstdn.social avatar

@unusual_whales excellent! this is how it should be, they should not be allowed to just keep your money especially if you cannot rebook for some reason

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

Cocoa Prices have Gone Nuts
Millie Giles & David Crowther
April 19, 2024

Cocoa prices are breaking records on an almost daily basis — with cocoa futures closing at (another) all-time high of $11,020 per metric ton yesterday.

That’s up 158% since the start of the year, and over 4x on the typical prices seen in 2022 — as crop production continues to fall short of demand.

Major cocoa-producing nations like the Ivory Coast and Ghana, which between them grow about two-thirds of the world’s cocoa, have seen excessive tree failure due to disease, changing weather patterns, and hot, dry conditions causing devastating droughts.

Consumers are starting to see the effects of the largest cocoa supply deficit in over 60 years: “shrinkflation” & reduced-cocoa recipes, and Hershey stock was recently downgraded.

Tthe International Cocoa Organization expects production to lag behind demand by 374,000 tons for the 2023-24 season.

https://sherwood.news/markets/cocoa-hits-usd11-000/

stevensanderson,
@stevensanderson@mstdn.social avatar

@shekinahcancook did inventory fall the same 300% the price went up?

stevensanderson, to Excel
@stevensanderson@mstdn.social avatar

Having fun trying to generate banner images for my upcoming book:

Extending Excel with Python and R

Amazon: https://packt.link/oTyZJ

#R

image/png

stevensanderson,
@stevensanderson@mstdn.social avatar
stevensanderson,
@stevensanderson@mstdn.social avatar

and more

image/jpeg

stevensanderson,
@stevensanderson@mstdn.social avatar

@jimgar lol yeah generating images seems wonky but its cool for sure

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

brodriguesco, to random
@brodriguesco@fosstodon.org avatar

What are some packages that take forever to compile?

stevensanderson,
@stevensanderson@mstdn.social avatar

@brodriguesco duckdb

stevensanderson,
@stevensanderson@mstdn.social avatar

@cedricr @brodriguesco yeah I just go get coffee when i update it but im ok with it because it more then makes up for it in its use

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

wervice, to programming
@wervice@fosstodon.org avatar

What is your favorite programming language?

stevensanderson,
@stevensanderson@mstdn.social avatar
jchyip, to Atlanta
@jchyip@mastodon.online avatar
stevensanderson,
@stevensanderson@mstdn.social avatar

@jchyip building housing stock is necessary and not just big single family homes but multi family homes and apartments that are bought not rented

stevensanderson,
@stevensanderson@mstdn.social avatar

@jchyip i think its got to be to own though not rent unless rents ate cheap like no more than 20% take home

logickinlambda, to datascience
@logickinlambda@mastodon.social avatar

Can any professional explain why use instead of writing some PL/SQL stored procedures then calling them using python?

I just found it is really tricky just to modify data conditionally on a single table, while these kind of tasks are easy using SQL update statement.

stevensanderson,
@stevensanderson@mstdn.social avatar

@logickinlambda good question, writing good sql is not super difficult and is i think easier

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

@ramikrispin i thinkn i might have gotten it. The purpose of this function is to estimate the parameters for a chi Square distribution the degrees of freedom and the non-centrality parameter that are present in rchisq() basically you should be able to pass a vector that you believe is chi squared into this function and get the parameter estimates

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

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