install.packages(c("stringi", "WikipediR", "tm","stringi","XML","httr","openssl"), 
                 repos="https://cloud.r-project.org/"
                #, lib="/usr/local/lib/R/site-library"
                )
Installing packages into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message:
In install.packages(c("stringi", "WikipediR", "tm", "stringi", "XML", : installation of package ‘openssl’ had non-zero exit statusWarning message:
In install.packages(c("stringi", "WikipediR", "tm", "stringi", "XML", : installation of package ‘httr’ had non-zero exit statusWarning message:
In install.packages(c("stringi", "WikipediR", "tm", "stringi", "XML", : installation of package ‘WikipediR’ had non-zero exit status
The downloaded source packages are in
	‘/tmp/RtmpIn2caU/downloaded_packages’
library("XML")
library("WikipediR")
library("tm")
library("stringi")
Error in library("WikipediR"): there is no package called ‘WikipediR’
titles <- c("Esino_Lario", 
            "Riemann_integral",
            "Riemann-Stieltjes_integral",
            "Derivative",
            "Limit_of_a_sequence",
            "Edvard_Munch",
            "Vincent_van_Gogh",
            "Jan_Matejko",
            "Lev_Tolstoj",
            "Franz_Kafka",
            "J._R._R._Tolkien")
articles <- character(length(titles))
for (i in 1:length(titles)) { 
  articles[i] <- page_content("en","wikipedia", page_name = titles[i])
}
docs <- Corpus(VectorSource(articles))
length(docs)
Error: could not find function "page_content"
11
corpus <- tm_map(docs, function(x) stri_replace_all_regex(x, "<.+?>", " "))
corpus <- tm_map(corpus, function(x) stri_replace_all_fixed(x, "\t", " "))
corpus <- tm_map(corpus, PlainTextDocument)
corpus <- tm_map(corpus, stripWhitespace)
corpus <- tm_map(corpus, function(x) stri_replace_all_regex(x, " . ", " "))
corpus <- tm_map(corpus, removeWords, stopwords("english"))
corpus <- tm_map(corpus, removePunctuation)
corpus <- tm_map(corpus, tolower)
corpus <- tm_map(corpus, stemDocument) 
corpus <- tm_map(corpus, PlainTextDocument)
Warning message:
In mclapply(content(x), FUN, ...): all scheduled cores encountered errors in user code
dtm <- TermDocumentMatrix(corpus)
tdm <- TermDocumentMatrix(docs)   
tdm
<<TermDocumentMatrix (terms: 0, documents: 11)>>
Non-/sparse entries: 0/0
Sparsity           : 100%
Maximal term length: 0
Weighting          : term frequency (tf)
freq <- colSums(as.matrix(dtms))   
freq
Error in as.matrix(dtms): object 'dtms' not found
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6
character(0)
6