RandVegan Profile Banner
#!/usr/bin/env Rscript Profile
#!/usr/bin/env Rscript

@RandVegan

Followers
1K
Following
8K
Media
260
Statuses
8K

Vegan. Learning R, Bash, Vim, SCSS and now apparently basic lua

Houston, TX
Joined November 2012
Don't wanna be here? Send us removal request.
@RandVegan
#!/usr/bin/env Rscript
2 months
Probably fitting that my last post is on my Twitter anniversary. Please follow me on blue sky @randvegan.baby.social
Tweet media one
0
0
4
@RandVegan
#!/usr/bin/env Rscript
3 months
@NashIsHere4It Good. Let the boomers get what they voted for. I don’t care anymore.
187
24
862
@RandVegan
#!/usr/bin/env Rscript
5 months
Emergency #rstats broadcast for those that use ggplot with power point.
@leonardojo
Leonardo Jo
5 months
It took me SEVEN years to figure out that you can save a ggplot as a vectorized .svg file ggsave("file.svg"). The svg file can be opened on powerpoint and it will be completely vectorized, even text are still recognized as text boxes! No more recreating plots on illustrator!!!!!
Tweet media one
7
97
820
@RandVegan
#!/usr/bin/env Rscript
2 years
Four year vegan anniversary today. Love this trend and encourage everyone to move to a plant based diet. My biggest regret is that I didn’t go vegan sooner. #vegan
Tweet media one
@Skye_Melissax
SkyeⓋ🖤🍉
2 years
Vegan, 2.5 years. I'm a noob haha.
Tweet media one
39
57
609
@RandVegan
#!/usr/bin/env Rscript
1 year
100% vegan thanksgiving. Delicious and cruelty free!
Tweet media one
137
35
540
@RandVegan
#!/usr/bin/env Rscript
2 years
Popeye was the realist for this one
Tweet media one
17
87
508
@RandVegan
#!/usr/bin/env Rscript
8 months
This is my annual reminder that read_csv() is vectorized so you don't need to use map() or lapply() to read in a list of csv files. Simply use list.files() to create a list of paths to your csv and from there pass it to readr's read_csv(). #rstats.
11
48
371
@RandVegan
#!/usr/bin/env Rscript
2 years
@lucydacus Progressives attacking progressives -- fantastic way for us to accumulate power and effect change.
182
4
324
@RandVegan
#!/usr/bin/env Rscript
5 months
@mattmfm Cancel the subscription and let’s move on.
8
6
232
@RandVegan
#!/usr/bin/env Rscript
11 months
@enjojoyy I don’t get the hate? This is incredibly efficient for the use case?.
4
0
297
@RandVegan
#!/usr/bin/env Rscript
5 months
@DeeLaSheeArt What’s your solution to anti social behavior. These criticisms would be interesting if you had a solution to stopping this? Or do you want me to go to your job and just cuss you out for doing it with consequence?.
16
2
277
@RandVegan
#!/usr/bin/env Rscript
5 months
@lisapease Please block me.
0
0
208
@RandVegan
#!/usr/bin/env Rscript
7 months
@t_NYC Can we just skip directly to republicans? . Can we for once direct at our Grief at the party that overwhelming stops progress? . I’m so tired of this both sides crap.
93
6
245
@RandVegan
#!/usr/bin/env Rscript
5 months
@GovTimWalz Hope stay strong. Don’t eat meat.
10
1
183
@RandVegan
#!/usr/bin/env Rscript
4 months
R vs python discourse is missing the point. At my company I do my analysis in R, then translate it the r code to sql and use power query in excel to replicate the analysis so that my staff can do their reporting. Focus on the massive market of corporate excel users.
4
18
214
@RandVegan
#!/usr/bin/env Rscript
4 months
the help me tremendously in my learning journey. Realizing we need a blog equivalent to categorize and index all the blog posts over the years as there are so many hidden gems. #RStats.
3
38
206
@RandVegan
#!/usr/bin/env Rscript
2 months
@byersblake @urbanistvc that isn't true. the MTA budget isn't managed by the city or the department but the state which raided its funding for purposes other than transit.
2
1
197
@RandVegan
#!/usr/bin/env Rscript
2 years
The df %>% .group_by() %>%.neat() %>%.mutate(new_col=map(var,fns)) pattern is so incredibly powerful. It honestly should be required reading for #RStats learners.
12
18
187
@RandVegan
#!/usr/bin/env Rscript
2 years
@shannonrwatts such a grifter and loser @KariLake.
0
5
155
@RandVegan
#!/usr/bin/env Rscript
5 months
purrr::possibly() is the most under-rated function. Finally got around to using it in my workflow and I'm saving so much time!. You won't find it on the purrr cheat sheet but its remarkably simple to use.
2
10
170
@RandVegan
#!/usr/bin/env Rscript
2 years
@peytonyager @MansfieldPDTX @FOX4 Thanks for covering what gun violence and culture of fear is doing to our communities.
1
3
131
@RandVegan
#!/usr/bin/env Rscript
4 months
I saw a blog comparing the many models approach between R and python and honestly thought it was a prank.
@lukasjung_hd
Lukas Jung
5 months
R users learning about data wrangling in Python #rstats
Tweet media one
1
8
158
@RandVegan
#!/usr/bin/env Rscript
5 months
@littmath % that coin is rigged over 1,000 simulations. Expected value is ~10%
Tweet media one
7
0
146
@RandVegan
#!/usr/bin/env Rscript
2 years
Delicious #vegan dinner. Who want some?
Tweet media one
15
13
123
@RandVegan
#!/usr/bin/env Rscript
5 months
Only because I'm on a #rstats cheat sheets kick, did you know the labelled package has its own cheat sheet?. This is a great package to help document your dataset so that everyone can understand what your data holds! You can actually put a column.
2
12
129
@RandVegan
#!/usr/bin/env Rscript
4 months
Why does base R feel like one or these secret bars where you need to go into a phone booth to get inside and see all the cool stuff?. Such a neat trick below!.
@strnr
Stephen Turner 🦋 @stephenturner.us
4 months
TIL base R has an `as.roman()` function. Why? #rstats
Tweet media one
3
10
134
@RandVegan
#!/usr/bin/env Rscript
4 months
R packages written by those who trained as software engineers and R packages written by data enthusiasts do not exist on the same plane of existence.
2
5
130
@RandVegan
#!/usr/bin/env Rscript
5 months
Since we are on purrr kick at the moment, another less known but also incredibly useful in #rstats is the purrr::partial() function. While useful on its own, where it really shines is in combination of map()+partial(). 1/n Let's look at an applied example!.
@MarvinSchmittML
Marvin Schmitt 👉🦋
9 months
@RandVegan My favorite function is purrr::partial().
3
9
129
@RandVegan
#!/usr/bin/env Rscript
2 years
Wish I came across this book earlier -- really helpful for functional programming and data analytics. Not a difficult read so far!.
1
33
135
@RandVegan
#!/usr/bin/env Rscript
7 months
Annual reminder that the janitor's package second most useful function is`janitor::excel_numeric_to_date()` which is critical when you importing excel sheets and you are bit by the excel convert dates to number bug.
3
17
120
@RandVegan
#!/usr/bin/env Rscript
1 year
@dcpetterson if leftest don't turnout to vote then frankly we need to look for a different coalition partner, even if its for policy positions we don't like. voting is about political power, its not about being right.
30
3
113
@RandVegan
#!/usr/bin/env Rscript
1 year
#rstats focuses a lot on data science applications but actually base R has some really great utility / automation functions!. The below post reminded me of my favorite functions, base::list.files(). You can see how flexible the arguments are which can help with copying, moving or
Tweet media one
@ajordannafa
Jordan Nafa
1 year
Those times when a few lines of python turns hours of copying and pasting files into like 3 seconds. 10/10 would recommend
Tweet media one
6
11
120
@RandVegan
#!/usr/bin/env Rscript
11 months
@NBCNews Yet they will still vote for him.
8
4
94
@RandVegan
#!/usr/bin/env Rscript
11 months
the base R vs. tidyverse wars has restarted.
@sTeamTraen
Nïck Brown🌻
11 months
Maybe I'm just old, but if you can do it in base R, why would you not? What possible benefit is there to adding package dependencies when you don't have to?.
Tweet media one
13
9
119
@RandVegan
#!/usr/bin/env Rscript
4 months
just discovered how to use S3 concepts in my code and this would have made alot of things much easier had I done this before. structure() is particularly helpful to control for certain behaviors and minimize errors.
2
14
117
@RandVegan
#!/usr/bin/env Rscript
1 year
@prchovanec @DrewPavlou I refuse to listen to “what we could have spent this money on” crowd who refused to advocate for spending money on things like need infrastructure, social health, green energy, etc.
41
1
99
@RandVegan
#!/usr/bin/env Rscript
1 year
When I started learning #rstats two years ago, I read a post declaring the beepr package the most helpful package and I was confused. Now that I'm running scripts and machine learning models all day, the beepr package is irreplaceable. Give it a try!.
0
16
104
@RandVegan
#!/usr/bin/env Rscript
1 year
@paulkrugman The messages needs to be that we have stabilized but need to do more for young adults and families. Not recognizing or acknowledging the discontent on housing costs is a huge miss. Real opportunity to generate support if he run policies to encourage affordable housing.
9
6
89
@RandVegan
#!/usr/bin/env Rscript
2 years
38
Tweet media one
4
1
94
@RandVegan
#!/usr/bin/env Rscript
8 months
Have you ever needed to incorporate color to the title, subtitle, legend or labels in your ggplot? #rstats. Then explore the new marquee package -- it absolutely shines in this area.
2
14
90
@RandVegan
#!/usr/bin/env Rscript
1 year
@igorbobic Yet they remain republicans. There could causas with democrats or be independents but instead they remain republicans.
8
5
83
@RandVegan
#!/usr/bin/env Rscript
7 months
Base R has so many cool functions. Just learned about normalizePath(), basename() and tools::file_ext(). Perfect solutions to the project I was working on.
5
7
88
@RandVegan
#!/usr/bin/env Rscript
1 year
@SteveKornacki Until pollsters take accountability for incredible polling misses in 2016 election, 2020 and 2022 mid terms — this and any poll is just laughable. There’s been no reconciliation / no bridging into why these projections are significantly different that reality. They are better.
3
9
63
@RandVegan
#!/usr/bin/env Rscript
3 months
@DrOBrienMD Gas will go down because it’s already trending down and opec will open their supply next year.
9
2
89
@RandVegan
#!/usr/bin/env Rscript
8 months
lots of discussion on git on my timeline. If you're an #rstats user two amazing resources to built up your confidence is of course @JennyBryan .and more recently @brodriguesco 's book The `gitcreds` package willl also help too.
1
19
86
@RandVegan
#!/usr/bin/env Rscript
4 months
Post your favorite #rstats blog sites below please :). I want to do something cool with the entries:.
@RandVegan
#!/usr/bin/env Rscript
4 months
the help me tremendously in my learning journey. Realizing we need a blog equivalent to categorize and index all the blog posts over the years as there are so many hidden gems. #RStats.
11
19
82
@RandVegan
#!/usr/bin/env Rscript
3 months
@abesilbe the unions stab democrats in the back and failed us. you just need to find a minority group and beat up on them apparently to win elections.
9
0
77
@RandVegan
#!/usr/bin/env Rscript
5 months
@kimberleeerose some of us are lactose intolerant.
8
0
81
@RandVegan
#!/usr/bin/env Rscript
2 months
@questionableway It’s part of the back room deals on cabinet positions.
4
1
79
@RandVegan
#!/usr/bin/env Rscript
2 years
Although I am a big fan of forever grateful for @JennyBryan fantastic I have to say I am blown away with @brodriguesco chapter on git. I finally have the confidence with git command line. Thank you @brodriguesco !.
1
14
79
@RandVegan
#!/usr/bin/env Rscript
9 months
Does anyone in #houston have experience with petitions?. The major's actions on vision zero are simply not acceptable. If you're interested in starting a recall petition, please let me know. Per the below website, we need 61,000 signatures.
20
12
70
@RandVegan
#!/usr/bin/env Rscript
7 months
lubridate's %m+% is saving my life right now. If you need to roll back or forward in time then %m+% will pull the end of the month when the equivalent reference date doesn't exist. eg. ymd("2021-01-31")%m+%months(1) returns 2021-02-28 rather than imaginary date of 2021-02-31.
4
6
70
@RandVegan
#!/usr/bin/env Rscript
7 months
my output is 10X my team due to R and the ecosystem. hands down if your a business analyst or an FP&A organization and you want to set yourself apart there is no way other language that I could recommend more. Not even close.
@brodriguesco
Bruno Rodrigues
7 months
if you're a data 'anything' and wonder "why is R still a thing?" maybe this answer I wrote on Reddit will help #RStats #pydata #datascience
Tweet media one
Tweet media two
1
5
71
@RandVegan
#!/usr/bin/env Rscript
5 months
While they are now harder to find, discovering hidden #rstats treats is always fun. @TimTeaFan tip below is a shiny gold treat!. With the new rstudio release, your environment can always display the .Last.Value value. Simply go to Global Settings> General > Advanced.
@TimTeaFan
Tim Tiefenbach
1 year
When writing #RStats scripts I often take a look at the outcome first, before assigning it to an object. This is fine, as long the function calls are inexpensive. If they are, base R’s `.Last.value` comes in handy. It has saved me more than once from re-running expensive code.
Tweet media one
4
5
70
@RandVegan
#!/usr/bin/env Rscript
6 months
@shenetworks Where do you find a dexa scan? A wellness facility?.
3
0
73
@RandVegan
#!/usr/bin/env Rscript
8 months
I will be deeply studying the {pointblank} library for the next two days if anyone needs me. Its exactly the solution, I've been looking for.
2
6
66
@RandVegan
#!/usr/bin/env Rscript
1 year
For those interested in learning about #gt tables in #rstats, @rappa753 write up on #gt tables finally gave me the confidence to apply these tables to my workflow. Strongly encourage to others that want to include visualizations in your writeup.
1
19
69
@RandVegan
#!/usr/bin/env Rscript
2 years
Plant based sushi
Tweet media one
2
4
67
@RandVegan
#!/usr/bin/env Rscript
6 months
@NoahMF He’s running the worst campaign. So disappointed. Imagine if we had beto.
6
0
65
@RandVegan
#!/usr/bin/env Rscript
4 months
Sometimes, I peek behind the scenes of the more "professional" R packages and I often find the use of {vctrs} library. Never really understood its use or potential under I saw @dvaughan32 blog post which details its use cases and advantages!.
2
9
68
@RandVegan
#!/usr/bin/env Rscript
1 year
Today's #rstats post is all about snippets! These are code completion shortcuts that are easy to learn, use and will save you a ton of time and effort for minimal cost -- so lets explore how to use snippets in Rstudio 🧵.
1
14
65
@RandVegan
#!/usr/bin/env Rscript
1 year
I am finally transition from the beloved `%>%` pipe to the new '|>' in #Rstats. First impression is how beautiful the new base R pipe looks! . For the most part, the transition is pretty smooth.
4
4
63
@RandVegan
#!/usr/bin/env Rscript
4 months
I'm doing a #rstats "translation" of the popular "how to automate the boring stuff with python". the book's emphasis is on shell based execution. Is that still relevant today? any recommendations on what to emphasis to deploy code? (eg. remote computers).
6
2
63
@RandVegan
#!/usr/bin/env Rscript
9 months
When learning map or purrr any blogs or concepts that really resonated with you?. Also what is your favorite purrr function that isn't map?. #RStats.
18
10
64
@RandVegan
#!/usr/bin/env Rscript
2 years
The #vegan hits keep coming
Tweet media one
8
7
60
@RandVegan
#!/usr/bin/env Rscript
9 months
I never want to use powerBI again. How to convince an org to use shiny apps?.
12
2
58
@RandVegan
#!/usr/bin/env Rscript
5 months
if you end up writing packages that use R to generate custom SQL statements then .1) glue::glue_sql() -- leverage glue features to pass in variables.2) DBI::Id() -- essential if you need to name tables eg `table.column`.3) paste0() -- when the above two can't meet your needs.
1
8
60
@RandVegan
#!/usr/bin/env Rscript
4 months
anyone done alot of time intelligence functions in R? eg. year over year, week over week, month over month, Current ytd vs. prior year ytd, etc?. lubricate is really helpful but not sure if there are other packages that also help here.
8
7
63
@RandVegan
#!/usr/bin/env Rscript
1 year
honestly learning #rstats has been one of the best decisions of my career. My career success has accelerated and my productivity so much higher. Highly encourage everyone to learn -- the community is amazing.
2
4
60
@RandVegan
#!/usr/bin/env Rscript
7 months
@jake_gotta And of course no accountability from her.
1
0
54
@RandVegan
#!/usr/bin/env Rscript
2 years
@DanCrenshawTX @DanCrenshawTX you represent me in my district. Can you instead talk about your voting positions and what work you are doing to improve our communities rather than engage in culture wars with a university that isn’t in our state?.
33
0
56
@RandVegan
#!/usr/bin/env Rscript
3 months
@vanillaopinions Just republicans made a bogey man out of antifa, Dems need to punch down on these leftist.
0
1
58
@RandVegan
#!/usr/bin/env Rscript
1 year
@Halcyon270 @nytimes Cancel your New York Times subscription. I did two weeks ago. Our media is broken. Support local media.
5
6
40
@RandVegan
#!/usr/bin/env Rscript
1 year
@Codie_Sanchez @elonmusk @BillAckman Disappointing that you believe the proganda and use your platform to spread misinformation. This is a complex issue that isn’t unique to Biden and incurred under all past presidents including trump. Nations fall because they are divide themselves — exactly what Texas is doing.
58
0
47
@RandVegan
#!/usr/bin/env Rscript
2 years
I can’t recommend enough @rappa753 guide to gt() tables. Previously I was intimidated by gt() but I’m now using it in all of my reports. I find it as critical to use as ggplot2() for those using R for business writing .
2
7
56
@RandVegan
#!/usr/bin/env Rscript
1 year
One of my favorite #rstats programmers @nrennie35 published a blog post on how stop repeating yourselves by sitting up template files and introducing to me the {linter} and {styler} packages. Also, I'm super impressed that she started to learn rust too!.
2
8
56
@RandVegan
#!/usr/bin/env Rscript
6 months
Using tidyselect verbs in dbplyr, sparklyr, tidymodels and gt package.
@haro_ca_
Carlos Alberto Haro
6 months
This is how coding with vim motions feels like.
1
3
53
@RandVegan
#!/usr/bin/env Rscript
1 year
2024 #rstats goals:.1) Publish my books on R (I want to give back to the open source community).2) Push my FP&A package to CRAN.3) "Master" shiny .4) Publish my Energy conversion package to CRAN.5) Fully transition to #neovim for my IDE.6) Get intermediate proficiency in #bash.
4
4
54
@RandVegan
#!/usr/bin/env Rscript
3 months
@AlecStapp Now do their wage growth as a % or the rent. He has an overall point that costs went up and we pointed to things like gdp and the stock market rather than understanding that housing prices 3x and is the biggest driver of inflation and one that is actually controllable.
0
2
51
@RandVegan
#!/usr/bin/env Rscript
1 year
I just came across @grrrck blogpost / package {epoxy} which combines the best of the {glue} package but also allows:.1) inline markup code (from cli's inline markup).2) autocomplete.3) is vectorized (*). amongst other benefits 🧵.
1
11
51
@RandVegan
#!/usr/bin/env Rscript
1 year
@AnaKasparian I respect you a lot @AnaKasparian and peace should absolutely be prioritized. But helping ukraine is absolutely in our interests and we should be supporting and encouraging this. Call out European Allies for sure. Ask hard questions about how Will bring peace and out and end to.
5
0
46
@RandVegan
#!/usr/bin/env Rscript
4 months
100% agreed!.@Fatih_Tuzen has a nice blog post introducing pivot_longer() and pivot_wider() for those that are curious.
@tcarpenter216
Tom Carpenter, PhD (@tcarpenter.bsky.social)
4 months
dplyr's pivot_wider() and pivot_longer() are some of the best APIs I've seen for quick data reshaping.
0
10
52
@RandVegan
#!/usr/bin/env Rscript
7 months
@RealPatrickWebb @DavidSacks Land doesn’t vote. People vote.
3
0
41
@RandVegan
#!/usr/bin/env Rscript
2 years
My toxic trait is reminding people you don’t need to use map() or lapply() to read multiple csv because read_csv() vectorizes over files when supplied with list.files #tidyverse #RStats.
1
5
48
@RandVegan
#!/usr/bin/env Rscript
8 months
okay -- so I continued with @duckdb tickering today. I deal with databases alot but these are ones administered by professionals. I didn't fully appreciate that I could create my own with @duckdb so lets learn how to use #rstats to show how.
3
6
48
@RandVegan
#!/usr/bin/env Rscript
1 year
@Kaylan_TX I'm half tempted to troll you @Kaylan_TX just so I can get a free background check as you explore every post and social media profile for dirt on my past 😆😆.
4
0
39
@RandVegan
#!/usr/bin/env Rscript
1 year
Another base R post, this time @TimTeaFan posts an incredible time saving tip in how `.Last.value` will assign an unassigned script *without** rerunning the analysis. This will save you hours!. 100% recommend you to read and follow Tim's blog.
@TimTeaFan
Tim Tiefenbach
1 year
When writing #RStats scripts I often take a look at the outcome first, before assigning it to an object. This is fine, as long the function calls are inexpensive. If they are, base R’s `.Last.value` comes in handy. It has saved me more than once from re-running expensive code.
Tweet media one
1
8
47
@RandVegan
#!/usr/bin/env Rscript
3 months
@TinaSfon He should focusing housing reform and making housing affordable again. That’s how you protect against trump.
3
1
46
@RandVegan
#!/usr/bin/env Rscript
1 year
Today I learned form @_Riinu_ about the %$% function in R that works with older base R functions to pull the variables from your data object eg. `diamonds %$%. cor(price,carat)`. Learn more from her book R for health sciences.
1
7
50
@RandVegan
#!/usr/bin/env Rscript
7 months
@tomandlorenzo Our path was easily predicted when we abandoned netscape.
0
0
45
@RandVegan
#!/usr/bin/env Rscript
9 months
@rlmcelreath You can do it @quarto_pub but also rmarkdown too. In quarto just use . ::: {.panel-tabset}. ## tab 1.Content.## tab 2.Content. :::.
0
0
46
@RandVegan
#!/usr/bin/env Rscript
11 months
3 years of ggplot and I have finally accepted that I will never understand how to use fct_reorder or fct_reorde2.
3
2
40
@RandVegan
#!/usr/bin/env Rscript
4 months
Shinylive for the win.
@R_Graph_Gallery
Yan Holtz
4 months
🙈 It's 11 PM. I'm trying to explain my sister in law why I'm so excited: . I managed to run a little R shiny app INSIDE a quarto report rendered _statically_ using Github:. 🎉. Now she believes I'm a weirdo 🙂
1
7
45
@RandVegan
#!/usr/bin/env Rscript
4 months
I feel like I have super power with #shiny and #duckdb -- honestly -- some many pain points can be solved with really responsive and easy to deploy web applications.
1
2
45
@RandVegan
#!/usr/bin/env Rscript
11 months
I just came across the wonderful pointblank library in R! Easily perform data validation, unit testing, and visualize your results in the awesome @gt_package table!. @Cghlewis in case you weren't already aware of it.#rstats.
3
10
44
@RandVegan
#!/usr/bin/env Rscript
1 year
@Fritschner And now when you read about the win they literally say it’s meaningless and doesn’t indicate anything.
0
0
37
@RandVegan
#!/usr/bin/env Rscript
2 years
The monochromeR package in R is @cararthompson holiday gift to the world. Has saved me hours in my visualization! Great blog on how to use it too. I think it’s a must for reports.
1
10
45
@RandVegan
#!/usr/bin/env Rscript
4 months
I feel attacked. I even do leading commas in dplyr::filter arguments 😶.
@drob
David Robinson
4 months
My least favorite coding practice is leading commas in SQL 🤢. "Oh it's easy to comment out a line-". It's easy to wear sweatpants out to dinner. But we live in a society
Tweet media one
10
2
44
@RandVegan
#!/usr/bin/env Rscript
4 months
wake up babe, new #rstats styler format just dropped.
@Corey_Yanofsky
Corey Yanofsky, α-stable statistician
4 months
@RandVegan leading comma, McMahon interested .leading pipe operator, McMahon excited .left arrow assignment to finish, McMahon tipping out of chair
Tweet media one
4
3
42
@RandVegan
#!/usr/bin/env Rscript
4 months
Do not shy away from the leading comma in all its glory and beauty.
Tweet media one
@RandVegan
#!/usr/bin/env Rscript
4 months
I feel attacked. I even do leading commas in dplyr::filter arguments 😶.
16
4
40
@RandVegan
#!/usr/bin/env Rscript
5 months
I love @littmath riddles because I get practice simulation in R and the answers always surprise me. My solution in the gist link (not efficient but its easy to follow the logic) and my results are below.
@littmath
Daniel Litt
5 months
You have 10000 coins. 9999 of them are fair; one is rigged so that it always lands on heads. You choose a coin at random and flip it 10 times; it’s heads all ten times. The coin is probably.
3
3
41