How do I create a column called "northsouth" that tells me if an ID visits latitudes that are both above and below 35.
df_input <- data.frame (ID = c(12, 12, 12, 12, 13, 13), lat = c(32, 34, 40, 39, 32, 30))
df_result <- data.frame (portID = c(12, 13), northsouth = c("yes", "no"))