R: tidy text dataset - tibble: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
Created page with "==Text Vector== text <- c("Because I could not stop for Death -", "He kindly stopped for me -", "The Carriage held but just Ourselves -", "a..."
 
Onnowpurbo (talk | contribs)
Line 10: Line 10:
==Tidy Text Dataset==
==Tidy Text Dataset==


install.packages("dplyr")
  library(dplyr)
  library(dplyr)
  text_df <- data_frame(line = 1:4, text = text)
  text_df <- data_frame(line = 1:4, text = text)
  text_df
  text_df

Revision as of 01:36, 31 October 2018

Text Vector

text <- c("Because I could not stop for Death -",
          "He kindly stopped for me -",
          "The Carriage held but just Ourselves -",
          "and Immortality")
text


Tidy Text Dataset

install.packages("dplyr")
library(dplyr)
text_df <- data_frame(line = 1:4, text = text)
text_df