R:如何通过汇总函数列出因子变量的所有级别

R: How to list all levels of a factor variable by summarise function

Neighhorhood 是一个因子变量,有 20 多个级别,我想查看所有级别的标准偏差,但我只能通过 summarize 函数看到 10 行。我该如何处理这个问题?

train  %>%
group_by(Neighborhood)  %>%
summarise(sd(price))
## # A tibble: 27 x 2
##    Neighborhood `sd(price)`
##          <fctr>       <dbl>
##  1      Blmngtn    26454.86
##  2      Blueste    10381.23
##  3       BrDale    13337.59
##  4      BrkSide    37309.91
##  5      ClearCr    48068.69
##  6      CollgCr    52786.08
##  7      Crawfor    71267.56
##  8      Edwards    54851.63
##  9      Gilbert    41190.38
## 10       Greens    29063.42
## # ... with 17 more rows

是:

tr %>% 
    group_by(Neigh) %>% 
    summarise(sd(pri)) %>%
    print(n=40)

问题解决了吗?