R Data Science Quick Reference by Thomas Mailund

R Data Science Quick Reference by Thomas Mailund

Author:Thomas Mailund
Language: eng
Format: epub
ISBN: 9781484248942
Publisher: Apress


## # A tibble: 150 x 5

## sepal_length sepal_width Petal.Length

## <dbl> <dbl> <dbl>

## 1 5.1 3.5 1.4

## 2 4.9 3 1.4

## 3 4.7 3.2 1.3

## # ... with 147 more rows, and 2 more variables:

## # Petal.Width <dbl>, Species <fct>

Filter

While select() extracts a subset of columns, the filter() function does the same for rows.

The iris_df contains three different species. We can see this using the distinct() function. This function is also from the dplyr package, and it gives you all the unique rows from selected columns.iris_df %>%

distinct(Species)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.