I had uploaded basic text file in Cloud . However whenever I am using strsplit function for the text, I am getting some NA's for some words which never existed in desktop version. What could be the reason ? Due to this, I am not able to get output for text mining ?
Cloud output - "CHAPTER" "I" NA NA "All" "her"
Desktop output - "CHAPTER" "I" "“Well," "Prince," "so" "Genoa"
sherlock <- readLines('war.txt')
text_sherlock <- sherlock %>%
strsplit(" ") %>%
unlist()
Getting this errors in console :
Warning messages:
1: In strsplit(., " ") : input string 2 is invalid in this locale
2: In strsplit(., " ") : input string 4 is invalid in this locale
3: In strsplit(., " ") : input string 8 is invalid in this locale
4: In strsplit(., " ") : input string 10 is invalid in this locale
5: In strsplit(., " ") : input string 12 is invalid in this locale