Running examples in ‘rfordummies-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ch05
> ### Title: Print examples of chapter 5 of 'R for Dummies'.
> ### Aliases: ch05 ch5
> 
> ### ** Examples
> 
> # Chapter 5 - Getting Started with Reading and Writing
> 
> # Using Character Vectors for Text Data
> 
> ## Assigning a value to a character vector
> 
> x <- "Hello world!"
> is.character(x)
[1] TRUE
> length(x)
[1] 1
> nchar(x)
[1] 12
> 
> ## Creating a character vector with more than one element
> 
> x <- c("Hello", "world!")
> length(x)
[1] 2
> nchar(x)
[1] 5 6
> 
> ## Extracting a subset of a vector
> 
> letters
 [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
[20] "t" "u" "v" "w" "x" "y" "z"
> LETTERS
 [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S"
[20] "T" "U" "V" "W" "X" "Y" "Z"
> letters[10]
[1] "j"
> LETTERS[24:26]
[1] "X" "Y" "Z"
> tail(LETTERS, 5)
[1] "V" "W" "X" "Y" "Z"
> head(letters, 10)
 [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"
> 
> ## Naming the values in your vectors
> 
> ### Looking at how named vectors work
> 
> str(islands)
 Named num [1:48] 11506 5500 16988 2968 16 ...
 - attr(*, "names")= chr [1:48] "Africa" "Antarctica" "Asia" "Australia" ...
> islands[c("Asia", "Africa", "Antarctica")]
      Asia     Africa Antarctica 
     16988      11506       5500 
> names(islands)[1:9]
[1] "Africa"       "Antarctica"   "Asia"         "Australia"    "Axel Heiberg"
[6] "Baffin"       "Banks"        "Borneo"       "Britain"     
> names(sort(islands, decreasing=TRUE)[1:6])
[1] "Asia"          "Africa"        "North America" "South America"
[5] "Antarctica"    "Europe"       
> 
> ## Creating and assigning named vectors
> 
> month.days <- c(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
> names(month.days) <- month.name
> month.days
  January  February     March     April       May      June      July    August 
       31        28        31        30        31        30        31        31 
September   October  November  December 
       30        31        30        31 
> names(month.days[month.days==31])
[1] "January"  "March"    "May"      "July"     "August"   "October"  "December"
> 
> # Manipulating Text
> 
> ## String theory: Combining and splitting strings
> 
> ### Splitting text
> 
> pangram <- "The quick brown fox jumps over the lazy dog"
> pangram
[1] "The quick brown fox jumps over the lazy dog"
> strsplit(pangram, " ")
[[1]]
[1] "The"   "quick" "brown" "fox"   "jumps" "over"  "the"   "lazy"  "dog"  

> 
> words <- strsplit(pangram, " ")[[1]]
> words
[1] "The"   "quick" "brown" "fox"   "jumps" "over"  "the"   "lazy"  "dog"  
> 
> ### Changing text case
> 
> unique(tolower(words))
[1] "the"   "quick" "brown" "fox"   "jumps" "over"  "lazy"  "dog"  
> toupper(words[c(4, 9)])
[1] "FOX" "DOG"
> tolower("Some TEXT in Mixed CASE")
[1] "some text in mixed case"
> 
> ### Concatenating text
> 
> paste("The", "quick", "brown", "fox")
[1] "The quick brown fox"
> paste(c("The", "quick", "brown", "fox"))
[1] "The"   "quick" "brown" "fox"  
> paste(words, collapse=" ")
[1] "The quick brown fox jumps over the lazy dog"
> paste(words, collapse="_")
[1] "The_quick_brown_fox_jumps_over_the_lazy_dog"
> paste(LETTERS[1:5], 1:5, sep="_", collapse="---")
[1] "A_1---B_2---C_3---D_4---E_5"
> paste("Sample", 1:5)
[1] "Sample 1" "Sample 2" "Sample 3" "Sample 4" "Sample 5"
> paste(c("A", "B"), c(1, 2, 3, 4), sep="-")
[1] "A-1" "B-2" "A-3" "B-4"
> paste(c("A"), c(1, 2, 3, 4, 5), sep="-")
[1] "A-1" "A-2" "A-3" "A-4" "A-5"
> 
> ## Sorting text
> 
> sort(letters, decreasing=TRUE)
 [1] "z" "y" "x" "w" "v" "u" "t" "s" "r" "q" "p" "o" "n" "m" "l" "k" "j" "i" "h"
[20] "g" "f" "e" "d" "c" "b" "a"
> sort(words)
[1] "The"   "brown" "dog"   "fox"   "jumps" "lazy"  "over"  "quick" "the"  
> 
> ## Finding text inside text
> 
> ### Searching for individual words
> 
> head(state.name)
[1] "Alabama"    "Alaska"     "Arizona"    "Arkansas"   "California"
[6] "Colorado"  
> 
> ### Searching by position
> 
> head(substr(state.name, start=3, stop=6))
[1] "abam" "aska" "izon" "kans" "lifo" "lora"
> 
> ### Searching by pattern
> 
> grep("New", state.name)
[1] 29 30 31 32
> state.name[29]
[1] "New Hampshire"
> state.name[grep("New", state.name)]
[1] "New Hampshire" "New Jersey"    "New Mexico"    "New York"     
> state.name[grep("new", state.name)]
character(0)
> 
> ### Searching for multiple words
> 
> state.name[grep(" ", state.name)]
 [1] "New Hampshire"  "New Jersey"     "New Mexico"     "New York"      
 [5] "North Carolina" "North Dakota"   "Rhode Island"   "South Carolina"
 [9] "South Dakota"   "West Virginia" 
> state.name[grep("East", state.name)]
character(0)
> 
> ## Substituting text
> 
> 
> gsub("cheap", "sheep's", "A wolf in cheap clothing")
[1] "A wolf in sheep's clothing"
> x <- c("file_a.csv", "file_b.csv", "file_c.csv")
> y <- gsub("file_", "", x)
> y
[1] "a.csv" "b.csv" "c.csv"
> gsub(".csv", "", y)
[1] "a" "b" "c"
> 
> 
> #### Extending text functionality with stringr
> 
> ## Not run: 
> ##D install.packages("stringr")
> ## End(Not run)
> library(stringr)
Error: package or namespace load failed for ‘stringr’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/stringi/libs/stringi.so':
  /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/stringi/libs/stringi.so: failed to map segment from shared object
Execution halted