filmov
tv
Create and Work with Vectors and Matrices in R | R Tutorial 1.4 | MarinStatslectures
Показать описание
In this R video tutorial we will learn to Create, Modify and Work with Vectors and Matrices in R.
▶︎▶︎Reminder: One of the important features of R is that it can handle complex statistical operations in an easy and efficient way. R handles complex computations using Vectors, Matrices, Lists, Dataframes and Datasets; In this video we focus on Vectors and Matrices in R. In R, Vector is a basic data structure that contains element of similar type (logical, integer, double, character, complex or raw). A matrix is basically a two-way generalization of a vector. Instead of a single index, we can use two indexes, one representing a row and the second representing a column.
▶︎▶︎In this R tutorial you will learn:
▶︎ How to create vectors in R for numbers or objects using the c function or concatenate function
▶︎ How to use seq function to create sequence data in R
▶︎ How to use rep function in R to create a vector of repeated numbers or characters
▶︎ How to create a matrix using matrix function in R and use square brackets to extract certain elements from a matrix in R
▶︎ How to perform basic arithmetic functions on the elements of one vector, preform arithmetic functions on the corresponding elements of two vectors and perform element-wise arithmetic functions in a matrix in R Statistical software.
This video is a tutorial for programming in R Statistical Software for beginners.
◼︎ Table of Content:
0:00:29 How to create vectors in R for both numbers or objects? By using the "c" or "concatenate" function
0:01:09 How to create a sequence of integer values in R? By using the colon (:)
0:01:20 How to create sequences in R ? We will use "seq" function in R
0:01:55 How to create a vectors of repeated numbers or characters in R ? we can use "rep" function in R
0:03:34 How to perform basic arithmetic functions on the elements of one vector in R?
0:04:02 How to preform arithmetic functions on the corresponding elements of two vectors in R?
0:04:59 How to extract elements of a vector in R? By using square brackets[] in R
0:06:08 How to create a matrix in R? we will use "matrix" function in R
0:06:21 How to set the number of rows and columns in a matrix in R? By using "nrow" and "byrow" functions in R
0:07:05 How to extract certain elements from a matrix in R? We can use the square brackets in R
0:08:06 How to perform element-wise arithmetic functions in a matrix in R?
►► Watch More:
This video is a tutorial for programming in R Statistical Software for beginners, using RStudio.
Follow MarinStatsLectures
Our Team:
Content Creator: Mike Marin (B.Sc., MSc.) Senior Instructor at UBC.
Producer and Creative Manager: Ladan Hamadani (B.Sc., BA., MPH)
These videos are created by #marinstatslectures to support a course at The University of British Columbia (UBC) (SPPH400: #IntroductoryStatistics and #RTutorial for Health Science Research), although we make all videos available to the public for free.
Thanks for watching! Have fun and remember that statistics is almost as beautiful as a unicorn!
Комментарии