Isabella R. Ghement Profile
Isabella R. Ghement

@IsabellaGhement

Followers
6K
Following
198K
Media
12K
Statuses
103K

PhD-level statistician, R trainer and statistical consultant. If you need statistical consulting or R training help, please reach out.

Richmond, B.C., Canada
Joined September 2011
Don't wanna be here? Send us removal request.
@IsabellaGhement
Isabella R. Ghement
4 years
@DrNadiaChaudhri The most beautiful part of your conversation will be when you show your son all the places in the world where you will continue to be present for him: the sky, the stars, the oceans, the trees, the flowers. .
9
82
3K
@IsabellaGhement
Isabella R. Ghement
4 years
@DrNadiaChaudhri Between the two of you, you can develop a signal - a hand wave, a touch of his heart - so that he’ll know that is how he can tap into your loving presence when he needs to. If you rehearse that signal together, it will be something he can find a lot of comfort in.
15
42
2K
@IsabellaGhement
Isabella R. Ghement
3 years
@data4style @AnnaGHughes Theranos, everyone?.
32
8
1K
@IsabellaGhement
Isabella R. Ghement
3 years
Writing R functions that rely on tidyverse functionality can be tricky. In this thread, I will share screenshots of a handout I put together on writing such functions using a common use case: plotting histograms. #rstats
Tweet media one
7
116
594
@IsabellaGhement
Isabella R. Ghement
4 years
I found a tweet on Poisson regression this morning on my feed and thought it would be a good time to write a tweetorial on Poisson regression. To keep things simple, I will assume we have a count response variable Y and a single predictor variable X. Here we go! #rstats
13
75
432
@IsabellaGhement
Isabella R. Ghement
3 years
@ZJAyres “Shut up, girl! Nobody asked you to give the answer.” . This, in front of the whole class, after we were ASKED to give the answer. From my high school math teacher. Still hurts to this day, considering I went on to get a PhD in Statistics.
11
4
411
@IsabellaGhement
Isabella R. Ghement
2 years
@SmithImmunology Time to follow up with all his references to inform them what a letdown he is and that his dismissive attitude towards female scientists will hurt his job prospects. Sorry you had to experience this!.
8
4
374
@IsabellaGhement
Isabella R. Ghement
10 months
This birthday girl has mixed feelings about getting older and all the overhead that comes with that. So the mood is not exactly celebratory. But it’s not like staying young forever is an option so off we go around the sun. One more time at least. 🤭
Tweet media one
124
27
373
@IsabellaGhement
Isabella R. Ghement
2 years
@reimthyme Gorgeous wedding photos! Congratulations to both of you - wishing you a lifetime of mutual adoration! 🥰.
1
4
326
@IsabellaGhement
Isabella R. Ghement
2 years
@ashleyruba When I was a grad student, we always got to meet the job candidates informally in our lunch area. I remember all candidates were recent graduates from places like Stanford, Harvard and Berkley. This sent a clear message that I never stood a chance at a job in academia.
3
7
261
@IsabellaGhement
Isabella R. Ghement
6 years
For R users wanting to understand how to write their own R functions: . A function is just like a receipe for baking a pie. Read the thread below for more mouth watering details. #rstats
16
77
243
@IsabellaGhement
Isabella R. Ghement
1 year
@DJGould94 My take is that only the person who got that PhD gets to decide how they wish to be called, how often, by whom, etc. The rest of us really have no business in deciding this for them, no matter how tempting it may feel. To do otherwise amounts to an unwelcome intrusion.
3
5
214
@IsabellaGhement
Isabella R. Ghement
5 years
One useful strategy for starting to learn R is to focus on mastering a simple goal. This will build confidence and lead to immediate improvement in current workflows. In this tweetorial, I will illustrate how easy it is to build and customize scatterplots in R. #rstats.
8
48
213
@IsabellaGhement
Isabella R. Ghement
4 years
@BritPat1021 @DrNadiaChaudhri If he understands that death does not mean utter abandonment but is a normal part of life we learn to cope with, he will be able to cope with the experience in a healthy way. He also needs to be reassured he will be loved and cared for by everyone around him. ❤️.
6
3
191
@IsabellaGhement
Isabella R. Ghement
3 years
In a mixed effects model context, using I tried to recreate and expand the animated plot comparing the (estimated) group-specific intercepts and slopes produced by the complete pooling, no pooling and partial pooling models. Shrinkage, baby! #rstats
7
27
179
@IsabellaGhement
Isabella R. Ghement
3 years
@DrNadiaChaudhri The immense power of your loving spirit is so touching and inspiring to witness, Nadia! You have redefined what it means to live meaningfully with a terminal illness while finding and cherishing the small pockets of joy everyday.
0
2
184
@IsabellaGhement
Isabella R. Ghement
6 years
@rstudio @thomas_mock RStudio really understands what the R community is all about: safety, inclusiveness, transparency, integrity, accountability and support. Thank you for your leadership! ❤️.
0
7
175
@IsabellaGhement
Isabella R. Ghement
4 years
@BritPat1021 @DrNadiaChaudhri The key is to keep him engaged in the process and give him ways to express what he feels (especially his fears). He needs an outlet for processing his shock and grief and having some concrete things he can do will be very empowering.
1
3
144
@IsabellaGhement
Isabella R. Ghement
5 years
Funny XKCD cartoon on curve-fitting methods and the messages they send.
Tweet media one
1
60
135
@IsabellaGhement
Isabella R. Ghement
2 years
Can we agree as a community that there is absolutely no need to shame anyone asking R questions with the horrible “read the fucking manual” answer? Yes, we know it makes you look smarter if you read the manual in question but how will that help anyone learn from you? #rstats.
13
9
125
@IsabellaGhement
Isabella R. Ghement
4 years
What factors influence the choice of a statistical model?. 1. Research question(s);. 2. Study design; . 3. Data considerations;. 4. Software availability;. 5. Skill of data analyst; . 6. Ease of interpretation; . 7. Time and budget constraints. Others?. #rstats.
16
15
126
@IsabellaGhement
Isabella R. Ghement
5 years
Had fun playing with the animation package in R to create an animated movie and save it as a gif file. If you are interested in learning how to animate a series of static plots (e.g., scatterplots), buckle up for the ride. The steps involved are outlined below. #rstats.
13
30
117
@IsabellaGhement
Isabella R. Ghement
1 year
Part of the end of year sadness is that I mentored several people on this platform and not one of them thought to reach out over the holidays. So in the new year, I resolved to cut back on my mentoring efforts. Being taken for granted is depleting for me.
25
3
129
@IsabellaGhement
Isabella R. Ghement
4 years
@BritPat1021 @DrNadiaChaudhri The other idea I have acknowledges that children love playing and sharing. On the playing part, you can develop a game together, e.g., “Where do we go after we die?” where you can both let your imagination wild with possibilities. You can use drawings, make up little songs. .
3
3
120
@IsabellaGhement
Isabella R. Ghement
2 years
@SaraSchon @AmyNelder If HE had the medical degree, why on earth did he tell YOU he had gout?
2
1
114
@IsabellaGhement
Isabella R. Ghement
3 years
@Joe_Bruch Before he met me, my husband hated being asked this question on his dates: “So, what do you do for a living?” . People don’t understand they need to relate to the person in front of them during a date, not their bank account or research topic. 😂.
5
3
120
@IsabellaGhement
Isabella R. Ghement
3 years
How we answer these two crucial questions will dictate how we write our histogram function. The attached screenshot illustrates the difference in approach based on (1) whether we will use quotes around a variable name or (2) we will NOT use quotes around a variable name.
Tweet media one
4
15
112
@IsabellaGhement
Isabella R. Ghement
2 years
@FlyBehaviour @bmwiernik Or maybe we should just be realistic and do exactly what less will afford us to do? . Because if we do more with less, the more will come from burn out and will translate into mental and physical health problems. So it just isn’t worth the high price!.
1
1
105
@IsabellaGhement
Isabella R. Ghement
4 years
@BritPat1021 @DrNadiaChaudhri On the sharing side, you can ask your son to share with you what he things are the best things about you being his mom (again, using drawings, etc.) His answers will be of great comfort to you!.
1
2
105
@IsabellaGhement
Isabella R. Ghement
3 years
Is there a way to get different text colours for the panel labels in a ggplot using the example available here: How? #rstats
Tweet media one
4
17
110
@IsabellaGhement
Isabella R. Ghement
4 years
@Firebirdxox @ucfagls I fear their misses will invite a lot of abuse from crazy fans on social media and could potentially affect their mental well being. It feels like they were thrown into the lion's den. Kane should have been saved for the last!.
1
3
103
@IsabellaGhement
Isabella R. Ghement
3 years
@davidhughes_phd It’s hard not to take it personally but these are strange times. Students are tapped out and learning requires mental energy they no longer have. Also, the lack of in-person socialization means people in general care less than before about how they make others feel.
1
4
100
@IsabellaGhement
Isabella R. Ghement
4 years
@splon @BritPat1021 @DrNadiaChaudhri Thank you, Sharon! I am none of those things - just someone who naturally has kindness and empathy for others. 💕.
0
0
98
@IsabellaGhement
Isabella R. Ghement
7 years
The purrr resolution for 2018 - learn at least one purrr function per week - is officially launched with encouragement and inspiration from @statwonk and @hadleywickham. We start with modify_depth: Please join to learn and share. #rstats.
4
25
96
@IsabellaGhement
Isabella R. Ghement
3 years
@SarahWieten One of my professors in grad school referred to ‘degrees of freedom’ as ‘independent pieces of information in our data available for estimating the parameter of interest’. He could have added: ‘if you use them, you lose them!” 🤣.
3
4
91
@IsabellaGhement
Isabella R. Ghement
3 years
@kareem_carr Why use 4 words when you can use just 3:. Statisticians are better!
1
2
83
@IsabellaGhement
Isabella R. Ghement
3 years
#rstats hive, how can I use the patchwork or cowplot packages to create a plot layout like the one enclosed? The examples I found via Google place the bottom plot below the top left plot: . plot1 plot2.plot3. but I want a layout like this:. plot1 plot2. plot3
Tweet media one
5
7
82
@IsabellaGhement
Isabella R. Ghement
5 years
@noah_greifer Things that come in handy when working with R:. 1. Google error messages posted by R and chances are you will find an answer. 2. Use recipes for common plotting tasks in R via 3. Conduct statistical analyses as explained at.
1
16
77
@IsabellaGhement
Isabella R. Ghement
7 years
Dr. Bonnie Ray: Questions I should have asked about grad school. #WSDS2017
Tweet media one
0
43
78
@IsabellaGhement
Isabella R. Ghement
4 years
All I wanted to do is create a forest plot of predicted random effects after fitting a mixed effects model via glmmTMB. It took me a lot of Googling (too much!) for what seemed to be a seemingly straightforward task. I might as well share the solution here. #rstats
Tweet media one
5
14
79
@IsabellaGhement
Isabella R. Ghement
3 years
How does ggplot2 work? #rstats.
33
3
76
@IsabellaGhement
Isabella R. Ghement
2 years
@toxicologist12 Not a bad idea! ERs typically have no amenities for patients stuck there for many hours - no vending machines with snacks, no coffee machines. I’ve always wondered why nobody things about changing this to provide some comfort to patients and their loved ones?.
12
0
73
@IsabellaGhement
Isabella R. Ghement
4 years
When you get this kind of feedback from one of your statistical consulting clients, you can call it a good day: . "You’re a massively helpful and talented statistician." . It took me about 15 years to get to this point but here we are!
8
2
65
@IsabellaGhement
Isabella R. Ghement
3 years
@vrognas browseURL("filename.xlsx") . to open Excel files from within R. Also works with .docx, .Rmd, .R, .csv, etc. It literally opens any type of file from within R.
4
4
65
@IsabellaGhement
Isabella R. Ghement
7 years
'The difference between using an R package and not using it is the documentation.' Lindsey Dietz #WSDS2017 #rstats.
1
19
68
@IsabellaGhement
Isabella R. Ghement
4 years
One of the hardest things to understand when stumbling upon mixed effects models is the difference between random grouping factors and random effects. A blog post ( got me thinking about ways to explain what a random grouping factor is. Read on. #rstats.
6
16
60
@IsabellaGhement
Isabella R. Ghement
3 years
Bayesian people, I need your help! If I have several competing brms models (zero-inflated beta mixed effects models) AND am interested in characterizing effects (not prediction!), what model comparison criteria shall I use? WAIC? LOO? Other? #rstats.
12
7
67
@IsabellaGhement
Isabella R. Ghement
2 years
On our wedding anniversary today, my husband surprised me with an enlarged photo of me at 18 years old - looking into the future & brimming with dreams. Such a sweet and loving gesture! He is truly the best! ❤️
Tweet media one
9
1
62
@IsabellaGhement
Isabella R. Ghement
2 years
@FlyBehaviour @bmwiernik But leadership never seems to value the health of their staff - they are just too obsessed with meeting their rigid and unrealistic targets.
0
0
61
@IsabellaGhement
Isabella R. Ghement
3 years
@CDelawalla Beyond what was suggested here, I would start with a plan for data cleaning, write it down and then write the R code in a way that captures those steps. Being organized will pay off dividends.
3
1
56
@IsabellaGhement
Isabella R. Ghement
3 years
Is there an easy way to use colour to highlight specific panels produced with ggplot2’s facet_grid() or facet_wrap()? #rstats
Tweet media one
6
8
64
@IsabellaGhement
Isabella R. Ghement
4 years
@WestHam @JesseLingard So happy to see you thriving again on the pitch, Jesse! Your flair, creativity and joy of playing can now be expressed again. Your talent deserved a better home and now you have one! ❤️.
0
1
57
@IsabellaGhement
Isabella R. Ghement
4 years
Did you know you can use the map() function from the purrr package in R to simultaneously apply the same "computational or graphical recipe" to each column of a dataset? In this tweetorial, I will explain how you can do this. Ready? Let's go! #rstats
2
12
58
@IsabellaGhement
Isabella R. Ghement
1 year
I've always wanted to take the geomtextpath package for a test ride & found the perfect use case for it. On the left, 3 superimposed density plots with default labelling produced by geom_textdensity(). On the right, same but with customization of labelling position. #rstats
Tweet media one
Tweet media two
2
12
59
@IsabellaGhement
Isabella R. Ghement
2 years
Dear Bayes Twitter, . What does it actually mean that 89% credible intervals are "more stable" than 95% ones? "Stable" in what sense?. #rstats
7
2
52
@IsabellaGhement
Isabella R. Ghement
3 years
If you are interested in learning more about the purrr package, I will give an online talk next week for the Bureau of Labor Statistics R Users. Date & Time:.Thursday, May 26th, 2022.11:00am - 12:00pm Pacific . Attendee link:. #rstats.
3
11
52
@IsabellaGhement
Isabella R. Ghement
5 years
@babbymd Your dad’s love will envelop you and protect you still, especially as you navigate your way through the complex terrain of grief. Love is something death can’t take away, it transcends the impermanence of our human condition. ❤️.
1
4
55
@IsabellaGhement
Isabella R. Ghement
2 years
Does R have a function/package for doing various types of centering of covariates prior to including them into a multilevel model (e.g., centering using group means)? #rstats.
22
8
54
@IsabellaGhement
Isabella R. Ghement
9 months
In Quarto, we can reference a figure like this: . @fig-1 . Is there a way to replace the 1 with an R variable, so that the 1 is not hardcoded? . Something like: . @fig-x. where x <- 1 is defined in an upstream code chunk? . #rstats.
8
7
56
@IsabellaGhement
Isabella R. Ghement
2 years
@coregenomics @SmithImmunology He is unlikely to respond well to feedback received from a woman - why give him the opportunity to strike twice?.
1
0
51
@IsabellaGhement
Isabella R. Ghement
4 years
@dawnd This response totally validates your refusal to get involved in the project. Wise decision!
0
0
44
@IsabellaGhement
Isabella R. Ghement
1 year
@kareem_carr Plagiarism can also come from intellectual laziness or downright carelessness, which don’t really have malicious tones to them. The only person who can vouch about the nature of their “intent” is the author.
2
0
52
@IsabellaGhement
Isabella R. Ghement
6 years
@Breza @rstudio @thomas_mock As a woman, I am tremendously grateful that a company like RStudio is standing up for all women in our community!.
0
1
49
@IsabellaGhement
Isabella R. Ghement
3 years
Prompted by @andrewheiss, I played a bit with font families in the context of creating ggplots that look more polished. In this thread, I will share how I got things to work on my Windows PC in the hopes that others will find this information helpful. #rstats
Tweet media one
3
6
49
@IsabellaGhement
Isabella R. Ghement
2 years
@coregenomics @SmithImmunology His mentors might be better placed to handle this because they know him and can get through. The fact he has made it this far with these views is concerning though - clearly the mentorship he’s received was lacking.
1
0
50
@IsabellaGhement
Isabella R. Ghement
2 years
This cartoon which illustrates the pandemonium interpretation of Bayesian Model Averaging is awesome! . It comes from from this paper: . and was created by Viktor Beekman. #rstats
Tweet media one
2
10
51
@IsabellaGhement
Isabella R. Ghement
1 year
@HermioneClone Where do I start? Perimenopause has been a total bitch - breast cancer (double mastectomy), disabling multi-day migraines, ocular migraines, insomnia…Trying to hang on for dear life, but obviously this has taken a huge toll on my mental health. Sending hugs!
2
0
43
@IsabellaGhement
Isabella R. Ghement
2 years
@MiaDoesAstro If you think other people are better than you in every way, the universe will never cease to supply you with evidence to back this flawed belief up. As we get older, we learn to accept that we are indeed different (not better/not worse, but different) than others.
3
2
45
@IsabellaGhement
Isabella R. Ghement
3 years
Hit me with your favourite examples of purrr functionality for writing elegant and efficient R code - I will use your ideas as inspiration for designing a talk I have to give on purrr. Thank you! #rstats
6
7
47
@IsabellaGhement
Isabella R. Ghement
3 years
@WhySharksMatter If someone lies about who they are, why would they expect to get your raw data in the first place? You did well not to share your data without knowing who and what you are dealing with.
0
1
43
@IsabellaGhement
Isabella R. Ghement
3 years
@Doc_Courtney Scientists do this because of inadequate statistical programming training during their formative years - the academic system releases them into the wild wholly unprepared for the rigors of reproducible science. Overhaul of the system is desperately needed!.
1
0
47
@IsabellaGhement
Isabella R. Ghement
3 years
Playing with ways to visualize Simple Linear Regression with Normally Distributed Errors as per @mjskay's . What better terminology should I use instead of "True Trend"? .#rstats
Tweet media one
3
12
45
@IsabellaGhement
Isabella R. Ghement
2 years
@SolomonKurz To this day, I don’t understand how people can conflate a MODEL (linear regression model) with an ESTIMATION METHOD FOR THE MODEL (e.g., OLS). I can see no circumstances under which a model would imply an estimation method and vice versa. I hope your poll settles it! 😁.
3
0
43
@IsabellaGhement
Isabella R. Ghement
3 years
@DrNadiaChaudhri @OtherOnesbyLee What a lovely tribute! We have all learned from Nadia that we have the power to create our own galaxy of love which can expand beyond the sun and the moon and the planets to include even the farthest of stars. When our galaxies of love collide, magical things happen! 🌞🌙⭐️❤️.
0
1
46
@IsabellaGhement
Isabella R. Ghement
11 months
I taught an intro R course this week and on the last day, we started with a gRatitude exercise: . Name one thing you are gRateful to R for. Since using R can come with frustration at times, reflecting on this will provide sustenance for those times. #rstats
5
1
43
@IsabellaGhement
Isabella R. Ghement
7 years
The map_dfr() function comes in handy when we need to simultaneously import multiple data files into R. The function will apply the same operation (e.g., read.csv) to each data file and row bind the results. See here for a detailed example: #rstats #purrr.
2
14
39
@IsabellaGhement
Isabella R. Ghement
5 years
@pmckelveyphd People are likely clinging to productivity because they need something to cling to when they have little control over the bigger picture. It's ok to implode - a natural response to an overwhelming situation.
0
2
44
@IsabellaGhement
Isabella R. Ghement
1 year
@stephenjwild This summer, I enjoyed reading the book 'Bayesian Multilevel Models for Repeated Measures DataA Conceptual and Practical Introduction in R'.by Santiago Barreda, Noah Silbert, recently published by CRC Press. It is written so nicely and I love its graphs & colourful R code.
Tweet media one
Tweet media two
1
2
42
@IsabellaGhement
Isabella R. Ghement
5 years
I have never used the ggtext package before, so time to give it a trial run. The thread below highlights a small fraction of its capabilities for beautifying graphs produced with ggplot2. Here is a preview of the beautifications. #rstats
Tweet media one
3
7
42
@IsabellaGhement
Isabella R. Ghement
4 years
@PhDemetri Fundamentally, the problem lies in new learners having a hard time with the concept of conditional distribution and the fact that regression modelling targets parameters describing the conditional distribution of Y given the X’s.
3
1
45
@IsabellaGhement
Isabella R. Ghement
3 years
If you want to learn something cool about working with named and unnamed R functions having a single argument, then this thread is for you. Spoiler alert: the thread involves an R robot. #rstats
1
9
43
@IsabellaGhement
Isabella R. Ghement
6 years
@DoctorKirbs @jd_wilko The hardest thing about not having a child is having all that nurturing love to give and no one to give it to. ❤️.
2
0
41
@IsabellaGhement
Isabella R. Ghement
3 years
@davidhughes_phd All you can really do is look after yourself in however way you can - do more of the things you enjoy and let the things you don’t enjoy fall by the wayside. This will replenish your energy and prepare you for what’s ahead (especially if it’s going to be a continuation of hell!).
1
2
41
@IsabellaGhement
Isabella R. Ghement
3 years
@tjmahr @SolomonKurz @bolkerb Wow! This is awesome! I had no idea patchwork can do this. Here is a variation with plot labels based on what you shared.
Tweet media one
Tweet media two
3
6
39
@IsabellaGhement
Isabella R. Ghement
3 years
@fugitiverabbit @DanielleGembala To see women enjoying their bodies exactly as they are is a thing of beauty. As women, we all struggle to various degrees with body acceptance. Thank you for sharing these inspiring photos. ❤️.
0
0
36
@IsabellaGhement
Isabella R. Ghement
4 years
Just came across the statement that "logistic regression is just a linear model" - yes, if the model is formulated on the log odds scale; but if the model is formulated on the odds or probability scale, it is a nonlinear model. Scale is important! #rstats.
4
9
36
@IsabellaGhement
Isabella R. Ghement
4 years
@jmb112485 @bartbing71 You haven't heard of the gtsummary package in R? 😜.
1
5
41
@IsabellaGhement
Isabella R. Ghement
5 years
For those working with or teaching GLMs, this blog post by Markus Gesmann on visualizing theoretical distributions of GLMs will come in handy (R code included). On his blog, you’ll also find this:. “Models are about what changes, and what doesn’t. Some are useful.”. #Rstats
Tweet media one
1
8
38
@IsabellaGhement
Isabella R. Ghement
3 years
In a mixed effects model, if I have random grouping factors A, B, C and D, such that: . 1) A and B are fully (or partially) crossed; .2) C and D are both nested within B and are partially crossed; . how do I specify that in lmer? Never worked with something like this. #rstats.
2
4
39
@IsabellaGhement
Isabella R. Ghement
2 years
Oh, it’s snowing and my husband just came home with red roses. He wanted to make up for the energy of unkindness someone on Twitter extended to me as well as for the fact that I spent 3 hours in the ER last Thursday with a scary health problem. He knew I needed this. ❤️
Tweet media one
Tweet media two
Tweet media three
Tweet media four
3
0
36
@IsabellaGhement
Isabella R. Ghement
2 years
@SolomonKurz I never like to transform predictor variables BEFORE including them in a regression model, because the model doesn’t make any assumptions about the distribution of predictor variables.
2
1
35
@IsabellaGhement
Isabella R. Ghement
4 years
Little Socks is feasting on cherry blossom petals. 🌸🐰🌸
2
7
34
@IsabellaGhement
Isabella R. Ghement
3 years
This "data cube" is brilliant and makes it so much easier to understand working with dates in R. I serendipitously found it in course notes by @visnut (Di Cook) and @nj_tierney (Nick Tierney) at #rstats
Tweet media one
3
4
34
@IsabellaGhement
Isabella R. Ghement
3 years
@ChelseaParlett As I like to say, there is no such thing as a "quick question" in Statistics. 😝. These days, I try to interpret confidence intervals as "compatibility intervals", as per advice in
3
5
39
@IsabellaGhement
Isabella R. Ghement
5 years
@Soph_Fedorowicz @AcademicChatter @PhDForum For every problem you will encounter during your PhD, you will discover you have enough resilience and creativity to overcome it. Each time you'll overcome a problem, you will feel stronger and more confident.
1
4
30
@IsabellaGhement
Isabella R. Ghement
7 years
#rstats #purrr Compute quantiles/percentiles: . library(dplyr); library(magrittr); library(purrr). mtcars %>%. select(.,mpg, wt) %>% . map(., quantile, probs = c(0.10, 0.90), na.rm=TRUE) %>% . frame(.) %>% . `rownames<-`(c("10%", "90%")).
1
8
37
@IsabellaGhement
Isabella R. Ghement
3 years
I hope this is useful - to understand more about why we need to write R functions this way when they include tidyverse functionality, please refer to this excellent YouTube video on Programming with Tidyverse functions by @TiffanyTimbers:
1
1
35
@IsabellaGhement
Isabella R. Ghement
4 years
@Brooke_Criswell @AcademicChatter You can't fail at something that is supposed to help you LEARN how to conduct research. All learning experiences are worthwhile! . The real question is: . Can you parlay your learning experience into a job in industry? . The answer is: . Absolutely!.
1
0
36
@IsabellaGhement
Isabella R. Ghement
3 years
Once we understand these basic rules, it becomes easy to add additional variable names to our function as input arguments. The screenshot below illustrates how we can add a grouping variable that would allow you to plot a histogram separately for each of several groups.
Tweet media one
2
5
39
@IsabellaGhement
Isabella R. Ghement
6 years
A bit late to this party, but I spent some time today trying to understand how the group_split() function from the dplyr package works. This thread illustrates its use when we need to split our data into several groups and create the same type of plot for each group. #rstats
Tweet media one
4
9
36