Having trouble viewing more than 10 rows in a tibble

后端 未结 3 2136
-上瘾入骨i
-上瘾入骨i 2021-01-04 05:02

First off - I am a beginner at programming and R, so excuse me if this is a silly question. I am having trouble viewing more than ten rows in a tibble that is generated from

3条回答
  •  没有蜡笔的小新
    2021-01-04 05:59

    What I often do when I want to see the output of a pipe like that is pipe it straight to View()

    library(dplyr)
    library(tidytext)
    
    tidy_books %>%
        anti_join(stop_words) %>%
        count(word, sort=TRUE) %>%
        View()
    

    If you want to save this to a new object that you can work with later, you can assign it to a new variable name at the beginning of the pipe.

    word_counts <- tidy_books %>%
        anti_join(stop_words) %>%
        count(word, sort=TRUE)
    

提交回复
热议问题