I love using and teaching R. For a while I was an adjunct faculty member, and I taught MFA students about data viz and R. It was so much fun! I always learn new things when I teach.
Based on my experience learning and teaching R, here are my five tips for learning R. (1/8)
1. Make mistakes. Mistakes help you learn. Even though I’ve been coding and using R for many years, I consistently run into errors and make mistakes when I code, and I always learn new things. (2/8)
2. Experiment and try new things. There is so much to learn and do in R, and it can feel both exciting and a bit overwhelming. But the more you experiment, the more you’ll learn. (3/8)
3. Find a community. Learning R is something we usually do in isolation in front of our computers, and it can feel lonely. #RLadies is a great place to find this community! Learning in community is great for getting help, discovering new tips, and making friends! (4/8)
4. Take your time. You don’t have to figure it out all at once. It's important to take breaks and remember that learning R bit by bit will actually help you remember it later on. There's so much R can do - you don't have to do it all right away. (5/8)
5. Practice on a topic you care about. It’s not very interesting to follow R tutorials on data you have no connection to. So, once you have a handle on some of the basics, my recommendation is to find a topic you care about and do your own project with it. (6/8)
Here are some resources that you can use to find datasets:
Happy Tuesday! Today I'm going to share a little more about my R journey.
I first learned R through a statistics class and book in college. Then I learned more about it in my second full-time job as a statistician in market research by reading and using another person's code.
I got really into doing data viz in R after I joined my local R-Ladies chapter (@RLadiesTucson) in 2020 and started participating in weekly #TidyTuesday sessions.
By practicing my data analysis and visualization weekly in R through #TidyTuesday, I've learned new functions and improved my #RStats skills. It's also super inspiring to see other people's work and explore their code. I really appreciate the openness of the R community!
Hi everyone! I'm Jenn, and I'm super excited to be curating #RLadies this week! I've worked in data/data science for about 10 years, and I love R! I mainly use R for data viz and analysis. (1/5)
This week I'll be talking about #DataViz and learning #RStats. I learned R first in grad school and then on the job when I worked as a statistician. (2/5)
Now, I use R in my work as a research analyst and for data viz projects I do for fun, like participating in #TidyTuesday and visualizing the books I read in 2021. (3/5)
(1/n) Since Halloween is just around the corner, let's talk about something spooky: presentations with LIVE CODING 🎃👻😱. To prepare for a 2-hour virtual workshop on package development, I came up with a system to help me stay organized.
Here's what helped⬇️
(2/n) First, what is it about live coding that makes it tricky? IMO it’s the amount of context switching. You need to keep the audience engaged while juggling an array of different apps (e.g. web browser, IDE, terminal). More apps = more unexpected things possibly happening.
(3/n) I decided to base my workshop on Chapter 2 of the R Packages book. The book did *a lot* of the heavy lifting for me; I used the section headings to outline my lesson plan. I also made sure to set aside some time for a break in the middle and a discussion at the end.
(1/n) A fun and practical idea for an R package: a #ggplot2 extension to modify plots so they adhere to an organization’s visual identity 📊📈📉⬇️
(2/n) A visual identity allows an entity to be instantly recognized. Made up of their logo, typography, and colors, it can be applied when creating external or internal communications. For example, here’s the visual building blocks of my alma mater @UBC: bit.ly/3EN0oNs
@UBC (3/n) My first crack at package development was during my master's studies with @UBCMDS. My classmates and I created a #ggplot2 extension to allow users to change the appearance of plots based on the visual identities of different Canadian universities: bit.ly/3VHssIe
(1/n) Think that your team's workflow could benefit from a custom R package but don't know where to start?
Here's a list of steps that helped me when I was embarking on my package development journey at my previous workplace ⬇️
(2/n) First, identify your team's needs. Are there any pain points that could be alleviate with code?
I chose to send out a questionnaire to formulate a team-wide wish list of functions they'd like to see in the communal toolbox 🧰
For each function, I asked for the following:
(3/n)
1️⃣ Description and purpose
2️⃣ Does a prototype exist? If it is available on a shared drive (or something similar), where can I find it 🔦 (e.g. path, line number)?
3️⃣ Expected input(s) and data type(s)
4️⃣ Expected output(s) and data type(s)
5️⃣ Expected frequency of use
(1/n) Last year, I led workshops on package development with the help of @RLadiesVan and @RLadiesSeattle. I often find it helpful learning why a tool is useful before diving into how to use it, so I began each workshop by motivating why you might want to try creating a package:
@RLadiesVan@RLadiesSeattle (2/n) I’ll write a few lines of code to accomplish a specific task. Later, I'll often find that the code chunk is rather applicable to other situations. I might copy and paste the relevant lines of code and repurpose it by changing a few characters here and there.
@RLadiesVan@RLadiesSeattle (3/n) If I find myself having to do this multiple times (>2), it's a sign for me to wrap the code into a function. If I ever need to change its behavior, I'll just have to edit the function definition. This sure beats trying to find and amend all instances of the copied code!