Select and Filter

I have a csv file for employee attrition. I want to select Employee number, MaritalStatus where empluyee attrition is Yes and No of year of experience is greater than 3.

I am new to R and not sure how should I proceed with this.

Step one is to load your data into R (some tips https://r4ds.had.co.nz/data-import.html).

After that, one tool in R that makes these kinds of filter operations quite easy and intuitive is the dplyr package. For a nice introduction to how this works check out the vignette here;

https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.html

This guide will help you get up to speed with dplyr's select and filter functions, which based on your title I think you are looking to get familiar with.


Since you're getting started with R, I'd encourage working with the R4DS book, online here https://r4ds.had.co.nz/ It's a nice way to learn about how to take advantage of R for data exploration

As you run into specific issues (say, specific coding issues, with errors messages, or output you weren't expecting), this forum is a good place to seek help and advice. We have a nice guide for R coding questions here: FAQ: Tips for writing R-related questions

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.