From the course: R Essential Training: Wrangling and Visualizing Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Data types and structures
From the course: R Essential Training: Wrangling and Visualizing Data
Data types and structures
- [Instructor] The same number can mean different things in different contexts depending on what the data type is, and also the structure that it's in, and even though you don't have to declare a variable type when you first enter things in R, you have an enormous amount of control over what your data means and how it is used. Let's start by going and looking at some of the fundamental data types in R. The most common is numeric, and so, I'm going to create a variable here called n1 for numeric number one, and I'm going to assign a value of 15. Now, the thing I want you to notice is that this is an integer number. I didn't say 15 point anything. But when I ask to see it, I'll just call n1. There's my 15, and then I use the command typeof. I'm asking R to tell me what type it is, and you'll notice it does not say that it's integer. It says that it's double precision, so, it's acting like it has lots and lots of decimal…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Installing R1m 25s
-
(Locked)
Environments for R3m 31s
-
(Locked)
Installing RStudio1m 17s
-
(Locked)
Navigating the RStudio environment6m 4s
-
(Locked)
Entering data7m 5s
-
(Locked)
Data types and structures12m 24s
-
(Locked)
Comments and headers4m 59s
-
(Locked)
Packages for R4m 46s
-
(Locked)
The tidyverse3m 4s
-
(Locked)
Piping commands with %>%4m 33s
-
-
-
-
-
-