I have until now been using a variation of an example of rowwise() provided in a previous question successfully but with the dplyr 0.7 update I am getting different output shown below:
df <- data.frame(A=rnorm(10), B=rnorm(10), C=rnorm(10))
library(dplyr)
df %>% rowwise() %>% mutate(Min = min(A, B, C), Max = max(A, B, C))
# A B C Min Max
# * <dbl> <dbl> <dbl> <dbl> <dbl>
# 1 -0.81771376 0.78083623 -1.2015681 -1.424118 1.422992
# 2 0.21576457 0.21769270 1.4229922 -1.424118 1.422992
# 3 -0.35391619 -0.42959396 -0.7036051 -1.424118 1.422992
# 4 -0.15828301 -1.21686431 -0.8696339 -1.424118 1.422992
# 5 0.33803125 -0.54362240 -0.5093769 -1.424118 1.422992
# 6 -0.32750861 -0.14352295 0.7709994 -1.424118 1.422992
# 7 -1.42411777 -1.22749344 -0.4734610 -1.424118 1.422992
# 8 0.05575431 0.89622715 0.7249636 -1.424118 1.422992
# 9 0.79927939 0.03648687 -1.4104142 -1.424118 1.422992
# 10 -1.41076196 -0.31738310 -0.2915965 -1.424118 1.422992
Where the results were previously the row-wise minimum and maximum they are now the minimum and maximum of each column.
I have checked the dplyr release notes but failed to spot any related points.
Has the use of rowwise() changed (or have redundant uses been removed) in the newest version of dplyr and if so can anyone suggest how I might amend my original code?
Thank you!