The quantile function under summarise is no longer working. I get the following error message:
Error: Column test must be length 1 (a summary value), not 2
mat <- matrix(rnorm(100*4,mean=0,sd=1), 100, 4)
colnames(mat) <- c("X1","X2","X3","X4")
mat %>%
as.data.frame() %>%
summarise(test=quantile(X1,c(.25,.5)),
q=c(.25,.5))
mat %>%
as.data.frame() %>%
summarise(test=quantile(X1,c(.25,.5)))
I expect the 25th and 50th percentile for X1.