'Trying to only get one row for Baltimore(city)

Here is the question: Can you use the across() function and the starts_with() selector?

This is what I have:

pm %>% 
 dplyr::filter(city == c("Baltimore", 
"Albuquerque")) %>% 
select(starts_with("county"), city)

This is what I am getting: I keep on getting two rows for Baltimore. The rows are the exact same and only want one

[[county, county_area, county_pop, city],
[Baltimore (City), 209..., 620.., Baltimore],
[Baltimore (City), 209..., 620.., Baltimore],
[Bernalillo, 300..., 662.., Albuquerque]]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source