Getting rid of a variable and its associated data

Hello. I am working on the Google Data Analytics Capstone project. I am looking at my dataset and see that in my 'member_casual' column, there are 3 variables. The 3 variables are 'member', 'casual', and 'dependent'. I want to get rid of the 'dependent' variables and any other information associated with them in their rows.

Here is a glimpse of my data:

glimpse(q4_2016)
Rows: 683,832
Columns: 10
$ ride_id            <chr> "12979228", "12979227", "12979226", "12979225", "12…
$ started_at         <chr> "12/31/2016 23:57:52", "12/31/2016 23:53:18", "12/3…
$ ended_at           <chr> "1/1/2017 00:06:44", "1/1/2017 00:08:13", "1/1/2017…
$ rideable_type      <chr> "5076", "5114", "1026", "504", "4451", "5643", "48"…
$ tripduration       <int> 532, 895, 931, 970, 980, 179, 1863, 1867, 1656, 108…
$ start_station_id   <int> 502, 195, 195, 199, 199, 47, 177, 177, 195, 264, 15…
$ start_station_name <chr> "California Ave & Altgeld St", "Columbus Dr & Rando…
$ end_station_id     <int> 258, 25, 25, 35, 35, 125, 140, 140, 195, 52, 42, 77…
$ end_station_name   <chr> "Logan Blvd & Elston Ave", "Michigan Ave & Pearson …
$ member_casual      <chr> "casual", "casual", "casual", "member", "member", "…

I know how to remove columns using the piping with select(-c()) but I don't know if I am supposed to use a variation of that to remove a specific variable. Could anyone please help me to remove the 'dependent' variable? Thanks

Take a look at the filter function from the dplyr package.

Thanks! I figured it out. You were helpful.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.