Learning to Code in R

This blog entry will be a running journal of my progress in learning how to code in R. After being inspired by James Clear’s book Atomic Habits, I feel inspired to create new small daily habits that will further advance my chance for a higher salary in a new data science role. It may be in my current company, or it may not. Either way, learning this skill will help me better understand data, coding, and statistics.

Day 1 (2/9/2021): I spent my time reading Nick Maggiulli’s guide to Learn Data Analysis. What a great way to inspire someone like me! I started the Introductory Course to R on DataCamp’s website and finished the first of the six sections they offer. I’m hoping to spend 45-60 mins coding every day. NOTE: Be careful when signing up for their subscription. Since I don’t know if I want a yearly subscription yet, I thought I’d start with their monthly subscription plan. It’s a bit hidden but make sure you select “monthly” vs “yearly.”

Day 2 (2/10/2021): Yesterday, I completed the “Intro to basics” sections on the datacamp course. Today, I met the “Vectors” section. I love the real-world examples they make us work through. I enjoyed analyzing my results from my trip to Vegas 😉 I was able to create vectors in R, select elements in them, and compare different vectors. I also learned about workplaces in R. One motivating factor is looking at the “daily XP” I gain from completing an exercise on Datacamp’s course. It’s almost like an award you get. I finished about ~50 minutes of coding, which is excellent! This is a strong start. On to the next day…

Day 3 (2/11/2021): Failed to code due to studying for my Hebrew class.

Day 4 (2/12/2021): Since I missed yesterday’s dose of coding in R, I completed two sections tonight. The third and fourth sections, namely, matrices and factors. With matrices, I learned how to create them and how to do basic computations with them, all while analyzing the box office numbers of the Star Wars movies. With factors, I learned how categorical data is stored in factors and how to create , subset, and compare them.

Day 5 (2/13/2021): Completed the fifth section tonight on creating data frames in R. In this section, I learned to create a data frame, select interesting parts of a data frame, and order a data frame according to certain variables. I feel great! I have one more section to finish before I finish the whole Introduction Course to R in Datacamp. Hoping to finish this tomorrow.

Day 6 (2/14/2021): Valentine’s day! Sorry, I had to spend time with my girlfriend today 🙂

Day 7 (2/15/2021): President’s day. Can’t code today. However, super inspired by this guy, Ken Jee, I found on YouTube.

Day 8 (2/16/2021): Completed the Intro to R course today! Check it out:

Day 9 (2/17/2021): Coded for ~30 minutes today. I wasn’t feeling too much today. However, I started a new course, called “Intermediate R”. Which is in essence, the next course after the Introduction course I finished yesterday.

Day 10 (2/18/2021): It’s a Hebrew day! Time to study some Hebrew and takes quizzes.

Day 11 (2/19/2021): Coded for ~60 minutes in total. Completed the first section (relational operators, logical operators, and building conditional statements) of the new intermediate course. One of the reasons I’m loving Datacamp’s website is that it’s gamified completing courses and projects on their website, which makes it more exciting to use. I want to keep racking in the XP points and completing courses. I love it! On to the next day.

Day 12 (2/19/2021): Coded for ~30 minutes. Began the second section on Loops.

Day 13 (2/20/2021): Didn’t code today.

Day 14 (2/21/2021): Coded for ~60 minutes. Finished half of the second section on loops.

Day 15 (2/22/2021): Didn’t code today.

Day 16 (12/23/2021): Didn’t code today. Date night.

Day 17 (2/24/2021): So a couple of developments so far. I’ve coded for ~70 minutes today.

  • Finished section two on Loops on Datacamp. Hoping to finish this whole course by this weekend.
  • Spent some time downloading R Studio.
  • Starting to learn about Git, Github, and coding with teams on Codeacademy. I’m debating if I should get a monthly subscription, just for this course. Not sure yet.
  • Sort of understanding the importance of “Add-Commit-Pull-Push” (once I know some Git, I think I will more.)

Day 18 (2/25/2021): Hebrew today. No code.

Day 19 (2/26/2021): Coded for ~15 minutes. Not motivated at all. I need motivation.

Day 20 (2/27/2021): Coded for ~30 minutes. Began section three today.

Day 21 (2/28/2021): Coded for ~30 minutes. Continued working on section three today. Found a sweet spot after coding tonight. I think I could develop and nurture this inspiration. Part of it is coming to self-identify myself as a “programmer”. I know that sounds weird because I don’t work at a big software company and just do this stuff on the week nights. But, the more I learn how to program, the more identify with being a programmer myself.

Day 22(3/1/2021): Coded for ~45 mins. Finished section three today. Learned what functions are and how to use them—then took charge by writing my own functions.

Day 23(3/2/2021): Coded for ~60 mins today. Finished section four today. Learned how to use the lapply, sapply, and vapply function over a list or a vector.

Day 24 (3/3/2021): Coded for ~120 minutes today. Finished the rest of the program! I think I’m going to go celebrate somehow… I need to think how I’m going to celebrate. Hmmm. Anyways, check out the certificate:

Leave a comment