Hi everyone.
I'm very new to learning R and I've run into this error while trying to delete columns. Below is the code I'm using.
all_trips <- all_trips >%>
Error: unexpected input in "all_trips <- all_trips >%>"
select(-c(start_lat, start_lng, end_lat, end_lng, birthyear ,gender ,"01 - Rental Details Duration In Seconds Uncapped" ,"05 - Member Details Member Birthday Year" ,"Member Gender" ,tripduration))
Error in select(-c(start_lat, start_lng, end_lat, end_lng, birthyear, :
object 'start_lat' not found
I've double checked that the columns exist. When I run it like this, I end up with "object 'start_lat' not found". When I put all column names in " ", I get the error "invalid argument to unary operator".
I also tried to code it in a different way, but got the same error.
all_trips <- subset(all_trips, select = -c(start_lat, start_lng, end_lat, end_lng, birthyear, gender, "01 - Rental Details Duration In Seconds Uncapped", "05 - Member Details Member Birthday Year", "Member Gender", "tripduration"))
Error in -c(start_lat, start_lng, end_lat, end_lng, birthyear, gender, :
invalid argument to unary operator
Since I'm still new and learning, this is only just practice. But any help will be highly appreciated.
Thank you.