I have the following dataset that I am trying to reduce to a single row by taking the mean of all the depths. When I try to use summarise() it gives me an error:
Error: Problem with `summarise()` input `..2`.
x Input `..2` must be a vector, not a function.
i Input `..2` is `mean`.
What I want it to look like is a dataframe with a single row and two columns: the SITE_ID and the MEAN_DEPTH_M.
One problem is that the DEPTH_M column in the data frame is entered as characters, so I put in a line of code to convert that column to numbers. I used the group_by() function so that the SITE_ID appears in the final data frame. Finally, the syntax of summarise() is not correct in your example.
Ahhhh thank you for the help with the syntax and also for reminding me to check if my data is character or numeric! This worked beautifully, thanks a ton for your help!