Data Types and Data Dimensions in R | Learn R
Jarad Niemi
0:00 / 0:00
Data Types and Data Dimensions in R | Learn R
1 129 просмотров · 4 года назад
Jarad Niemi
7,01 тыс. подписчиков
1 129 просмотров · 4 года назад
#jaradniemi #learnr #datatypes #datastructures #numeric #character #logical #vector #matrix
This video covers the basic data types of numeric, logical, and character objects and their dimension including scalar, vector, and matrix in the statistical software R.
By default R stores all numeric quantities as a numeric using double precision in memory. There is also the ability to utilize integers, but (for data analysis purposes.
For vectors, we discuss how to construct vectors, access vector elements, and modify vector elements. We construct vectors using the c(), seq(), and rep(). We access vector elements using square brackets ( [ ] ) along with the indices, but you can also access vector elements using a logical vector. We modify vector elements by accessing those elements and using the assignment operator.
For matrices we discuss how to construct matrices, access elements, and modify matrix elements. We construct matrices using cbind(), rbind(), and matrix(). We access matrix elements using square brackets with a comma in between ( [ , ] ) with the row and column indices, but you can also access matrix elements using logical vectors. We modify matrix elements by accessing those elements and using the assignment operator.
Chapters
00:00 Introduction
00:40 class(), length(), dim()
01:22 Numeric
01:54 Character
02:34 Logical
03:51 Integers
05:40 Vectors
08:00 Construct vectors
09:04 seq()
11:50 rep()
15:30 Access vector elements
17:00 Access vector elements using logicals
18:13 Modify vector elements
19:20 Construct matrices
22:00 Access matrix elements
24:10 Arrays
24:45 Data types in matrices
25:42 Conclusion
R script: https://www.jarad.me/youtube/scripts/...
Learn R: • Learn R
R download: https://www.r-project.org/
RStudio download: https://www.rstudio.com/products/rstu...
R logo (no changes made): https://www.r-project.org/logo/