Subsetting Sort Select Data in R with Square Brackets | R Tutorial 1.5

0
86

#IntroductoryStatistics
#RVideoTutorials
#RTutorial

email address
ramzifayad1978@gmail.com

When working with a large data set, you might only be interested in a small portion of it. How do you sort through all the variables and observations and extract only the data that you need? R has several ways of sorting and selecting data in a process that is called “subsetting.” Brackets in R lets you select, or subset, data from a vector, matrix, array, list or data frame.

R’s operators can be summarized as:
• [ for subsets,
• [[ for extracting items, and
• $ for extracting by name.

In this R tutorial video, we focus on subsetting data from a vector and matrix in R.

source

LEAVE A REPLY

Please enter your comment!
Please enter your name here