Course 7‐1 - Forestreee/Data-Analytics GitHub Wiki

Google Data Analytics Professional

[Data Analysis with R Programming]

WEEK1 - Programming and data analytics

R is a programming language that can help you in your data analysis process. In this part of the course, you’ll learn about R and RStudio, the environment you’ll use to work in R. You’ll explore the benefits of using R and RStudio as well as the components of RStudio that will help you get started.

Learning Objectives

  • Compare and contrast the R programming environment and the RStudio programming environment
  • Describe the RStudio programming environment including its components and benefits
  • Describe the R programming language and its programming environment
  • Describe programming languages and appropriate use including examples
  • Download and install R assets to a computer
  • Open R and execute a command
  • Differentiate between the R Console and R programming environments
  • Execute operations in R using mathematical operators such as +, -, *, and /
  • Download and use RStudio Desktop
  • Demonstrate how to complete basic tasks in R

The exciting world of programming

Introduction to the exciting world of programming

Hey there, data pro. You've come a long way since the beginning of your learning journey. Congratulations on your accomplishment. Just think of all the skills you've learned along the way.

You now know how to use structured thinking to define a problem and ask the right questions; work with spreadsheets, databases, and tools like SQL to organize and transform data; clean your data to make sure it has integrity before you analyze it; create impactful visuals to illustrate key points; and craft a compelling story to communicate insights to stakeholders. That's an impressive list of skills, but we're not done yet. Your skills set's about to get even bigger.

In this course, you'll learn about a new concept called programming and how you can use the R programming language to analyze your data.

By now, you know that the data analysis process includes six phases: ask, prepare, process, analyze, share, and act. Now, we'll learn all about the R programming language and how it can help you in each phase of the process. When you're done, you'll be presented with an optional case study. The case study will give you the chance to solve a data analysis problem using all the skills you've learned in this program. You'll find out more about this project later on.

Let's talk about computer programming. Computer programming refers to giving instructions to a computer to perform an action or set of actions. You can use different programming languages to write these instructions. You might choose a specific language based on the project you want to pursue or the problem you want to solve.

The R programming language is super useful for organizing, cleaning, and analyzing data. If this is your first experience with computer programming, welcome. When I first started learning about data analysis, I didn't have a background in programming either. In fact, before I fell in love with data, I was trained as an opera singer. I also have a lot of friends that came into this field from the arts and learned about programming later in their career. R is a great place to start. Learning R for the first time can be challenging and even more empowering. A lot of the skills you've learned in this program will help you learn basic programming concepts. Take it one step at a time and go at your own pace. Just like in previous videos, you'll start with the basics and move forward from there. You've tackled tough challenges before and you always come out on top. You've got this.

Let me introduce myself. My name's Carrie. I work as a research manager at Google. I lead a team that researches the best way to improve the performance of people in organizations. In other words, I help people work better and work smarter and help organizations function in a healthy and productive way. I first learned R as a junior data analyst, while I was working on a multi-year project about virtual work. We were looking at data on people's virtual work experiences and trying to understand how working remotely impacts performance. It was a complex project with a lot of data to sift through. I kept encountering problems and searching for better and faster ways to do things. This is when I became aware of the power of R. Whenever I got stuck, I'd learn a little more about R and discover a solution to my problem. I soon realized that R could help me do almost anything involving data even better and faster than I thought possible.

Fortunately, there are tons of great online resources for R and a super supportive online community. If I had a question, I'd go online and find the answer. As the project progressed, I was able to learn more and more and become a much more effective data analyst. My teammates even started coming to me for advice about R. Realizing that I could continue to learn my skills at any stage in my career was an empowering experience. Learning R unlocked my ability to perform data analysis at the highest level. In your future career as a data analyst, you'll have the opportunity to continually learn and grow. To me, that might be one of the coolest aspects of the job. Learning R is one of the most rewarding parts of that growth process. I'm still learning new ways to use R all the time. Plus, you can apply these skills to other programming languages like Python, Julia, or JavaScript. There's no limit to how far you can go with programming. It even goes beyond data analysis. After I learned R, I found myself thinking about all kinds of projects I could use programming for, both at work and for fun. It opens up a whole new world of possibilities.

Now, let's talk about what you're about to learn. We'll start off with an introduction to programming languages. Then we'll take a closer look at R itself and explore its main features and functions. We'll also cover some basic programming concepts and learn how to use them effectively in R. Next, we'll learn how to work with data in R. You'll discover how R can supercharge your data analysis skills and let you clean, transform, visualize, and report data in new and more powerful ways. Learning R will help you take your data analysis to the next level. It'll also look great on your resume. R is widely recognized as a key credential in entry-level job positions. Knowing how to use R will give you a big boost in your job hunt and will help you stand out as a new analyst.

Coming up, we'll talk more about programming languages in general and how they can help you analyze your data. After that, we'll jump right into R. Before you know it, you'll be using R to power your data analysis.

Course syllabus (Reading)

Data Analysis with R Programming (this course)

In this course, you will learn how to use the R programming language to work with your data without tool limitations. You will get plenty of practice using R for statistical analysis, and RStudio—an integrated developer environment (IDE) for R that you will use to create advanced data visualizations with lots of detail. R makes it easier to present your data with beautiful, artistic style. A few other advantages of R include its:

  • Popularity: R is frequently used for data analysis
  • Tools: R has a convenient library of ready-to-use tools for data cleaning and analysis
  • Focus: R was created with statistics in mind; data analysts can conveniently use a rich library of statistical routines
  • Adaptability: R adapts well for use in both machine learning and data analysis projects
  • Availability: R is an open source programming language

After you get comfortable and more confident using R and RStudio, you might find that you are curious to learn and add even more programming languages to your skillset (and resume). Pretty exciting, right?

Course content

  1. Understanding the basics of R: R is a programming language that can be used to perform tasks in every phase of the data analysis process. In this part of the course, you will learn about R and RStudio, an integrated developer environment (IDE) for R. You will explore the benefits of using RStudio to work with R. RStudio enables you to easily leverage the features and functionality of R.

  2. Programming using RStudio: In this part of the course, you will explore the fundamental concepts associated with R. You will learn about functions and variables that you can use in your calculations and other programming. You will also learn about R packages, which are collections of R functions, code, and sample data that you can use in RStudio.

  3. Working with data in R: The R programming language was designed to work with data at all stages of the data analysis process. In this part of the course, you will examine how R can help you structure, organize, and clean your data through functions and other processes. You will learn about data frames and how to work with them in R. You will also revisit the concept of data bias and how you can use R to address it.

  4. Visualizations, aesthetics, and annotations: R is a great tool for creating detailed visualizations. In this part of the course, you will learn how to use R to generate and troubleshoot visualizations. You will also explore the features of R and RStudio that can help you improve the aesthetics of your visualizations. You will learn how to annotate visualizations and save the changes.

  5. Documentation and reports: R has a number of different options to explore when you are ready to save and present your analysis. In this part of the course, you will explore R Markdown, a file format for making dynamic documents with R. You will learn how to format and export R Markdown and incorporate R code chunks in your documents.

  6. Course challenge: At the end of the course you will apply everything you have learned in the Course Challenge. The Course Challenge will ask you questions about the key skills you have been practicing and will give you an opportunity to demonstrate those skills in three scenarios.

Refresher: Your data analytics certificate roadmap (Ungraded Plugin)

The R-versus-Python debate (Reading)

Learning Log: Get ready to explore R (Reading)

Fun with R

Hi, great to see you again. When I first learned R, it was the visuals that really got me hooked.

I still think it's so cool that you can write a little bit of code, press a button and, presto, out pops an awesome data visualization.

Before we get into all the details, I thought it would be fun to give you a quick sneak peek and show you what R can do. What follows will be a preview of what you're going to learn. By the end of this course, you'll not only understand all this code, you'll be able to write and execute it as well. For now, just sit back, relax and enjoy the show.

Friendly reminder - the remainder of this video is a preview to show you what R can do, and what you'll be learning throughout this course. You do not need to follow along. Just sit back, relax, and enjoy the show. :)

Let's start by loading a library and getting a dataset to work with. We can use the palmer penguins dataset, which contains size measurements for three penguin species that live on the Palmer Archipelago in Antarctica.

This includes data on stuff like body mass, flipper length and bill length. The dataset has 344 rows of information sorted into eight columns. The palmer penguins data is popular with analysts and is great for fun exploration, visualization and teaching concepts. We'll see more of this data set later on in the course.

Let's say we want to visualize the relationship between body mass and flipper length. You may guess the larger the penguin, the longer the flipper. We can find out for sure by creating a plot. Let's make a scatter plot. A scatter plot uses points to display the relationship between two variables. So the two variables were going to compare our body mass and flipper length. No need to memorize all these details right now. You'll have time to learn more about them later on.

Let's check out the parts of this code and how they fit together. The first function starts the plot. If we run the code at this point, all we get is a blank plot.

If we add some more code, R will put labels on each access of our plot and add lines for data. Body mass is on the y-axis and flipper length is on the x-axis, but the data points are not yet visible.

To get the complete plot, we can add some more code that tells R how to represent our data. For example, we could use points, bars or lines. We'll use points to create a scatter plot.

We can go further. For example, we can change how the plot looks. Let's change the color of all of the points to purple. You can hit the Up arrow to pull up the last piece of code you ran, so we'll do that now. And then we'll add in color equals purple inside geom point. Now we can hit Enter to run this.

We can also add new information to the plot and use color to highlight it. Let's tell R to assign a different color to each species of penguin. This way we can link data points to each group of penguins.

Gentoos are the largest. The legend just to the right of the plot shows us that the blue points refer to the Gentoos. R automatically creates a legend for the plot to help us understand the color-coding.

R does everything you tell it to do and even does stuff you don't ask for. It's just that helpful.

We can also use shape to highlight the different penguin species.

Or we can use both color and shape.

In addition to highlighting our data, we can also reorganize it. We can break our data down into smaller groups or subsets and create a plot for each subset. Let's say we want to focus on the data for each species. Facet functions let us create a separate plot for each species. Check this out. Facets are so great.

We can even put text on our plot to point to specific data or communicate a message. Let's give our plot a title to clearly indicate its purpose.

Finally, we can save our plot, so we can access or share it later on. Now, if we click on the Files tab, we'll find our file in the list. Let's open it up.

Well, that's the end of the show. I hope you enjoyed it as much as I did. We were able to take a big dataset and quickly visualize some significant patterns. These are some of the basic functions in R. In other words, this is just the beginning. It's exciting to think of all the ways R can help you realize the full power of data analysis. As you move forward, you learn more about each of the functions we use to create our plots. By the end of this course, you'll be the one writing and executing all of this code.

Coming up, we'll learn more about computer programming and how it can help you analyze your data. See you soon.

Carrie: Getting started with R

The advice I would give to someone just learning R is that mistakes are part of the process. Errors and error messages are part of the process. When I think about the people who are even better than I am in R, I've come to realize they're not necessarily smarter than I am, but they may be a little bit more persistent and delving a little bit deeper. Certainly compared to when I started, initially I'd see an error message and think, "I did it wrong, uh-oh, game over." Now it's like, "That's just part of the game." When I started to get a little bit of exposure to what R looked like, I was like, "That seems too sophisticated. It seems like that probably is really hard." But the people who used it that I had met, we're always really enthusiastic about it and they felt like it had so many advantages over other software that you can use for running analyses.

There were a lot of times before I used R where I might use spreadsheets or some other tool and I would be trying to hack at what really needed to happen. Sometimes I was using multiple tools because an individual tool couldn't really do all what I wanted it to do. But it's like I knew in my mind and yet it wasn't totally fluid, the execution of it. The more exposure I've gotten to R, the more I realize a lot of what I would try to do that way, I can just do within one program, and it can all interlock really fluidly.

At first, I was really unconfident. I had a couple of scripts where I had some friends who were better at R, people I worked with who would sit down and help me go through and understand the code and so it felt really silly to ask them the simple question of like, "Okay, but why is a bracket here?" Or "Why would we do this?" But they were fortunately really patient people. Then at some point, our entire department said, really everybody needs to be using this because we need everyone on the same platform. We need consistency in our analyses. We need to be able to code review each other's analyses as well.

We all took an online course together and that helped me feel really a lot more confident because it was walking through each step of what you needed to know, got an opportunity to practice, and then it felt like, "Okay, even if there's things I don't know, "I've made it through introduction, like I've made it through this next module so I do know something." Then once I started to apply it in my work, there would still be points where I was like, "Wait, I don't know how to solve this problem." Then I would talk to a friend, Google something and generally, I knew a lot more than I thought that I did and from that, I suddenly unlocked my ability to produce a whole lot of analyses quickly with the big dataset and also produce a whole lot of data visualizations really quickly using ggplot2. Hi, my name's Carrie and I'm a Research Manager within People Operations at Google.

Meet and greet (Discussion Prompt)

In this course, you’ll learn how to use R to supercharge your data analysis. You’re about to embark on an exciting and rewarding learning journey!

Please write 2-3 sentences (20-60 words total) to check in with your fellow learners, exchange ideas, and introduce yourself if you’re new to the course. Feel free to craft your own response, or use the following questions for prompts:

  • What is your professional background?
  • What led you to enroll in this course?

Then, add 3-5 sentences (60-100 words total) sharing your thoughts on programming. Feel free to craft your own response, or use the following questions for prompts:

Background in programming:

  • What programming languages have you worked with?
  • What personal or professional projects have you used programming for?
  • What do you enjoy most about programming?
  • If you are new to programming, what are your feelings about learning how to program using R—are you excited, a little nervous, or both?

Finally, visit the discussion forum to read what other learners have written, engage with two or more posts, and share your feedback.

Programming as a data analyst

Programming languages

In this course, you’ll learn how to use R to supercharge your data analysis. You’re about to embark on an exciting and rewarding learning journey!

Please write 2-3 sentences (20-60 words total) to check in with your fellow learners, exchange ideas, and introduce yourself if you’re new to the course. Feel free to craft your own response, or use the following questions for prompts:

  • What is your professional background?
  • What led you to enroll in this course?
  • Then, add 3-5 sentences (60-100 words total) sharing your thoughts on programming. Feel free to craft your own response, or use the following questions for prompts:

Background in programming:

  • What programming languages have you worked with?
  • What personal or professional projects have you used programming for?
  • What do you enjoy most about programming?

If you are new to programming, what are your feelings about learning how to program using R—are you excited, a little nervous, or both?

Finally, visit the discussion forum to read what other learners have written, engage with two or more posts, and share your feedback.

Programming languages

Hi. Great to have you back.

Earlier, you learned that programming means giving instructions to a computer to perform an action or set of actions. Even if this is your first time programming, you already have plenty of experience telling a computer what to do. For example, you've probably used a spreadsheet function to sort your data or perform calculations, or you might have used SQL to tell a computer how to pull data from a database or join two different data tables.

Programming goes even further. It gives you the highest level of control over your data. SQL can communicate with databases, but a general-purpose programming language lets you create your own applications and build your own functions from scratch. To program, you first need to know a programming language.

In this video, we'll learn about the basics of programming languages and how they can help you work with your data.

Programming languages are the words and symbols we use to write instructions for computers to follow. You can think of a programming language as a bridge that connects humans and computers, and allows them to communicate. Programming languages have their own set of rules for how these words and symbols should be used, called syntax. Syntax shows you how to arrange the words and symbols you enter so they make sense to a computer.

Coding is writing instructions to the computer in the syntax of a specific programming language. Just like the variety of human languages around the world, there's lots of different programming languages available to communicate with computers.

There's a language for almost anything you want to do, from designing websites, to developing video games, to working with data.

For example, Python is a general-purpose language that can be used for all sorts of things, from working with artificial intelligence to creating virtual reality experiences. Javascript works well for developing online apps and is an essential part of web browsers. Some other popular programming languages for data analysis include SAS, Scala, and Julia. Personally speaking, R is my favorite language for data analysis, but you might want to explore other languages as well.

While programming languages can look different on the surface, they all share similar structures and coding concepts. Once you learn your first language, you'll find it easier to learn others. Coming up, we'll explore R's many capabilities. Before that, let's talk about some benefits of using any programming language to work with your data.

I'll highlight three. Programming helps you clarify the steps of your analysis, saves time, and lets you easily reproduce and share your work. Let's start with clarity. Programming languages have specific rules and guidelines for giving instructions to the computer. When you're telling a computer what to do, your instructions have to be very clear. There can't be any inconsistency in the way you write code. If there is, the code won't work. Translating your thoughts into code forces you to figure out exactly how to write each step of your analysis and how all the steps fit together. It gives your analysis a level of precision that makes it really powerful.

Using a programming language for data analysis also saves you lots of time. For example, take the process of cleaning and transforming your data. With one line of code, you can create a separate dataset without any missing values. With another line, you can apply multiple filters on your data. This lets you spend less time preparing your data and more time on the analysis itself. Finally, programming languages make it easy to reproduce your analysis. Data analysis is most useful when you can reproduce your work and share it with other people. They can double-check it and help you solve problems. Code automatically stores all of the steps of your analysis so you can reproduce, and share your work at anytime in the future, weeks, months, or even years later.

Here's an example. Let's say you're working on a project. You've collected and cleaned your data and started your analysis, but the results don't add up. You suspect a mistake was made in the process. You'd like to discuss the issue with a teammate and get their feedback. If you used a spreadsheet, you both might have to redo the entire analysis to discover the error. There's no easy way to record and reproduce your steps in a spreadsheet, but if you use a programming language, all your work can be reproduced and shared in a moment, from loading the data, to creating visualizations, to reporting the results. Plus, you can easily update your analysis and fix any errors simply by changing the code. I hope that gives you a better understanding of what programming languages are all about.

Next up, we'll check out R in more detail. See you soon.

Question:

Ways to learn about programming (Reading)

From spreadsheets to SQL to R (Reading)

Introduction to R

Hello again. Now that we've talked about programming languages in general, let's get to know R.

So what is R? R is a programming language frequently used for statistical analysis, visualization and other data analysis. Later on, you'll take a tour of Rstudio, which is a popular software environment for the R language.

In this video, we'll discuss R's main features and functions and its advantages for data analysis. R is super cool. I'm excited for you to learn about it. R is based on another programming language named S. In the 1970s, John Chambers created S for internal use at Bell Labs, a famous scientific research facility. In the 1990s, Ross Oaxaca and Robert Gentleman developed R at the University of Auckland, New Zealand.

The title R refers to the first names of its two authors and plays on a single-letter title of its predecessor S. Since then, R has become a preferred programming language of scientists, statisticians and data analysts around the world.

There's lots of reasons why people who work with data love R. I want to share four with you. R is accessible, data-centric, open-source and has an active community of users.

First R is an accessible language for beginners. Lots of people without a traditional programming language learn R. I should know. I'm one of them. R really appeals to anyone who wants to solve problems that involve data. And that's one of the things that's so great about R.

It's all about data. R is what's known as a data-centric programming language. It's specifically designed to make data analysis easier, more efficient and more powerful.

Another awesome thing about R is that it's open source. Open source means that the code is freely available and may be modified and shared by the people who use it.

Let's pause for a moment and unpack how amazing this is. First anyone can use R for free. Second, anyone can modify the code, fix bugs and improve it. In fact, over the years, lots of excellent programmers have made improvements and fixes to the R code. For example, anyone who knows the R language can create what's called an add-on package. We'll talk more about R packages later. For now, just know that literally thousands of R packages exist, and they were all built by people who wanted to solve specific problems. A lot of these packages are super useful for data analysts. As an R user, you now enjoy the benefit of the shared knowledge. And let me just add, the R community is the best. This vibrant, diverse and accessible community is so supportive of new learners. You can go online anytime to find answers to all your R questions. Check out websites like R for Data Science Online Learning Community and RStudio Community. On top of that, R users are all over Twitter and other social media. You'll discover tons of resources for professional networking, mentoring and learning.

Now that we know more about the general benefits of R, let's talk about some specific situations when you might use it for data analysis. Here's three scenarios: reproducing your analysis, processing lots of data, and creating data visualizations.

First R can save and reproduce every step of your analysis. Earlier, we discussed how data analysis is most useful when you can easily reproduce your work and share it with others. In R, reproducing your analysis is as easy as pressing a button on your keyboard. Your code stores it forever. And you can share it with anyone at any time.

Processing lots of data is also something R does really well, just like SQL. As you learned earlier spreadsheets organize projects in sheets or tabs. If you've ever had to deal with spreadsheet files that have tons of sheets or lots of data in each sheet, you know that things can start to move very slowly. Working with too much data in a spreadsheet can even cause crashes. R can handle large amounts of data much more quickly and efficiently.

Finally R can create powerful visuals and has state-of-the-art graphic capabilities. As you've seen in this program, tools like spreadsheets and Tableau offer lots of options for visualizing your data. R's on another level. With only a small bit of code, you can create histograms, scatter plots, line plots and so much more. And that's just the beginning. If you work with more advanced packages, you can make some seriously impressive data visualizations.

Learning R is a huge benefit to anyone interested in becoming a data analyst. As I mentioned earlier, knowledge of R will help you stand out as a job candidate. And as you keep moving forward, R will help you find solutions for more complex data problems. You can keep learning about R throughout your career as a data analyst. The sky's the limit when it comes to developing your data analysis skills. That's all for now.

Coming up, we'll check out the RStudio environment together. Before you use RStudio, you need to download and install the basic R interface. You'll learn how to do that in an upcoming reading. Most analysts who work with the R language use the RStudio environment to interact with R, and not the basic interface. That's why we're focusing on RStudio in this program. Following this video, you'll find resources for downloading R and RStudio if you're interested in learning more. Bye for now.

Question:

Optional Hands-On Activity: Downloading and installing R (Practice Quiz)

Test your knowledge on programming languages (Practice Quiz)

Learn programming using RStudio

Intro to RStudio

Hey there. It's time to take our tour of RStudio. The examples we'll look at are from RStudio Cloud, but RStudio works in a similar way across all platforms. Feel free to use the platform that works best for you. Later on if you want to learn more, you'll find resources on how to download and install RStudio on your own device.

RStudio's an IDE or integrated development environment. This means that RStudio brings together all the tools you might want to use in a single place. The R console which we explored earlier is one part of this environment. RStudio also includes an editor for writing code, and tools for managing your data and creating visuals. RStudio is built specifically for use with R. It'll help maximize your productivity as a data analyst.

Data analysis is like driving a car. You can think of R and RStudio as different parts of this car. R is like the car engine. RStudio is kind of like the accelerator, the steering wheel, and dashboard all-in-one. It lets you tell the engine what to do and helps you get to where you want to go. Just as a speedometer and navigation system make driving much easier, RStudio's environment makes using R much easier.

In an earlier reading, you learned how to access RStudio.

Would you like to set up an RStudio account to follow along with the steps in this video? Complete the next Hands-On Activity: Cloud access to RStudio, and then click Continue below to play the rest of this video.

So let's log into RStudio now and explore. The RStudio environment has four main windows called panes. Each pane helps you perform different functions. The first time you open RStudio, you'll see three panes.

A fourth pane is hidden by default, but it's easy to open. Just click on File in the menu, then select New File and R Script.

RStudio has lots of keyboard shortcuts. To learn more check out Keyboard Shortcuts Help.

You can make the panes smaller or larger by clicking on the minimize or maximize buttons at the upper right of each pane. You can also click and drag the borders of the panes to adjust their size. Click on the Panes button for more feature options. Now that we've got all four panes open, let's explore each of them. We'll start on the lower left and move clockwise from there. You might recognize the R console from an earlier reading. As a quick refresher, the console is the place where you give commands to R.

If you would like to preview or install the dataset used in this video, refer to the palmerpenguins package for the detailed information.

For example, we can tell R to show us a summary of the penguins data that we used in an earlier video to create visuals. You'll need to install and load the palmer penguins dataset if you haven't done so already.

Above the console in the upper left is the source editor pane. You'll use the source editor when working with R Scripts. There are two main ways of writing code in RStudio: using the console or using the source editor. You can type commands directly into the console, but they'll be forgotten when you close your current session. As we've discussed, it's important to be able to reproduce and share all the steps of your analysis. If you save your script in the editor, you can access your work again at any time and show others how you did it.

The source editor and the console also work together in RStudio. When you execute code in the editor, the code automatically appears in the console. If you're working on a long analysis, this makes it easy to execute the entire code all at once or run specific sections of it as you go along.

Let's run some code in the editor and check it out.

Pro tip: Always keep in mind that R is case-sensitive. Here we use a capital V for the View function.

Next, let's go to the Environment pane in the upper right. Here you'll find all the data you currently have loaded and can easily organize and save it. For example if you import data from a spreadsheet, it'll be visible in the Environment pane. You can view each object in the Environment pane by clicking on it. You can also toggle between a List view and a Grid view.

To the right of the Environment tab, you'll find the History tab. All your previous commands are saved here and they're easy to search and re-execute. You'll find the most recent line of code at the bottom of the list. You can copy any line to the command console by double-clicking it.

In the lower right, you'll see a pane that has tabs for Files, Plots, Packages, and Help. The Files tab gives you access to your file directory and shows the contents of the current working folder. You can easily find and manage all your files and create new project folders. Next is the Plots tab. If we create a plot, the result appears here. For example, we can create a scatter plot with the penguins dataset we used earlier.

Note: At this point of following along you may not have installed the 'ggplot' package, which would normally allow you to generate a plot for the penguins data set. In order for the upcoming plot algorithm to work first type and execute each line of the syntax below, which will install the 'tidyverse' package:

install.packages("tidyverse")
library(tidyverse)

Once the above library is installed and loaded the ggplot syntax coming up next will successfully generate a plot. You will have a much more in-depth exploration of ggplot parameters and other data visualizations in the upcoming video lecture, Visualizations in R and tidyverse.

You'll learn more about creating plots in RStudio later on.

Earlier, we talked about R packages which are custom solutions to data problems developed by R users. RStudio gives you access to a library of R packages known as the tidyverse. You can upgrade, install, and manage your library in the Packages pane. Packages loaded in your current session have a check mark. Later on, we'll explore the tidyverse in more detail.

Finally, click on the Help tab. Here you can find helpful resources for R and RStudio. There are tons of resources out there to help answer all your questions. Be sure to take advantage of them. That's our tour of RStudio. We're just scratching the surface of what RStudio can do. Soon you'll get to explore RStudio in more detail.

Speaking as a data professional, I love working in RStudio. It makes my work so much easier, faster, and better. Congratulations on finishing another step in your data analyst learning journey.

Coming up, we'll learn some basic programming concepts. Then we'll start working with R. For those of you who are new to programming, you're about to write your first lines of code. See you then.

Hands-On Activity: Cloud access to RStudio (Practice Quiz)

Optional Hands-On Activity: Get started in RStudio Desktop (Practice Quiz)

When to use RStudio (Reading)

R&R... Studio! (Discussion Prompt)

Connecting with other analysts in the R (Reading)

Test your knowledge on programming with RStudio (Practice Quiz)

Module 1 Challenge


Course 7 Module 1 Glossary