Input data from Excel file
Desired Output[]
Here is the code I am using:
I read the test input into the data frame 'noah5yrs'. Then, in the output for each year, I want 'Year' to be in ascending order but 'winloss' to be in descending order. How can I do that?
noah5yrs %>% mutate(winloss = substring(Rslt,1,1)) %>% group_by(Year, winloss) %>% summarize(mean_GSc = mean(GSc, na.rm=TRUE), sdGSc = sd(GSc, na.rm=TRUE))