Running examples in 'tidytext-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: unnest_tokens
> ### Title: Split a column into tokens using the tokenizers package
> ### Aliases: unnest_tokens
> 
> ### ** Examples
> 
> 
> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

> library(janeaustenr)
> 
> d <- tibble(txt = prideprejudice)
> d
# A tibble: 13,030 x 1
   txt                                                                      
   <chr>                                                                    
 1 "PRIDE AND PREJUDICE"                                                    
 2 ""                                                                       
 3 "By Jane Austen"                                                         
 4 ""                                                                       
 5 ""                                                                       
 6 ""                                                                       
 7 "Chapter 1"                                                              
 8 ""                                                                       
 9 ""                                                                       
10 "It is a truth universally acknowledged, that a single man in possession"
# ... with 13,020 more rows
> 
> d %>%
+   unnest_tokens(word, txt)
# A tibble: 122,204 x 1
   word     
   <chr>    
 1 pride    
 2 and      
 3 prejudice
 4 by       
 5 jane     
 6 austen   
 7 chapter  
 8 1        
 9 it       
10 is       
# ... with 122,194 more rows
> 
> d %>%
+   unnest_tokens(sentence, txt, token = "sentences")
# A tibble: 7,066 x 1
   sentence                                                                     
   <chr>                                                                        
 1 "pride and prejudice  by jane austen    chapter 1   it is a truth universall~
 2 "however little known the feelings or views of such a man may be on his firs~
 3 "\"my dear mr."                                                              
 4 "bennet,\" said his lady to him one day, \"have you heard that netherfield p~
 5 "mr."                                                                        
 6 "bennet replied that he had not."                                            
 7 "\"but it is,\" returned she; \"for mrs."                                    
 8 "long has just been here, and she told me all about it.\""                   
 9 "mr."                                                                        
10 "bennet made no answer."                                                     
# ... with 7,056 more rows
> 
> d %>%
+   unnest_tokens(ngram, txt, token = "ngrams", n = 2)
# A tibble: 122,203 x 1
   ngram         
   <chr>         
 1 pride and     
 2 and prejudice 
 3 prejudice by  
 4 by jane       
 5 jane austen   
 6 austen chapter
 7 chapter 1     
 8 1 it          
 9 it is         
10 is a          
# ... with 122,193 more rows
> 
> d %>%
+   unnest_tokens(chapter, txt, token = "regex", pattern = "Chapter [\\\\d]")
# A tibble: 1 x 1
  chapter                                                                       
  <chr>                                                                         
1 "pride and prejudice\n\nby jane austen\n\n\n\nchapter 1\n\n\nit is a truth un~
> 
> d %>%
+   unnest_tokens(shingle, txt, token = "character_shingles", n = 4)
# A tibble: 536,526 x 1
   shingle
   <chr>  
 1 prid   
 2 ride   
 3 idea   
 4 dean   
 5 eand   
 6 andp   
 7 ndpr   
 8 dpre   
 9 prej   
10 reju   
# ... with 536,516 more rows
> 
> # custom function
> d %>%
+   unnest_tokens(word, txt, token = stringr::str_split, pattern = " ")
# A tibble: 124,032 x 1
   word       
   <chr>      
 1 "pride"    
 2 "and"      
 3 "prejudice"
 4 ""         
 5 "by"       
 6 "jane"     
 7 "austen"   
 8 ""         
 9 ""         
10 ""         
# ... with 124,022 more rows
> 
> # tokenize HTML
> h <- tibble(row = 1:2,
+                 text = c("<h1>Text <b>is</b>", "<a href='example.com'>here</a>"))
> 
> h %>%
+   unnest_tokens(word, text, format = "html")
Error in chartr("<U+2019>", "'", as.character(add_words)) : 
  'old' is longer than 'new'
Calls: %>% ... dictionary -> dictionary -> dictionary_load -> chartr
Execution halted