Data Frames in R - Subsetting a data frame

preview_player
Показать описание

How to subset a data frame using square brackets and the dollar sign.

We can subset data frames like we would subset a matrix, or like we would index a list.

To index a specific element in a data frame, we use square brackets, row index, coma, column index.

To reference a row, pass the row number in the square brackets and leave a space on the column indicator.

To reference a variable in a data frame, call the column number, leaving a space for the rows. Or use double brackets to call the column by name.

365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists.

We at 365 Data Science are committed educators who believe that curiosity should not be hindered by inability to access good learning resources. This is why we focus all our efforts on creating high-quality educational content which anyone can access online.

#Statistics #Datascience #RProgramming
Рекомендации по теме