String Manipulation with stringr in R
Charlotte Wickham
Assistant Professor at Oregon State University
"hi!"
"hi!"
# I said "hi!"
"I said "hi!""
Error: unexpected symbol in ""I say "hi"
'I said "hi!"' # A single quote
"I said \"hi!\""
'I said "hi!"' # A single quote
"I said \"hi!\"" # An esacpe sequence
"I said \"hi!\"" # # An escaped double quote
"I said \"hi!\""
"hi!" # No quotes in the string, use double quotes
"hi!"
'I said "hi!"' # Doubles quotes in the string,
# use single quotes
"I said \"hi!\""
"I'd say \"hi!\"" # Doubles and single quotes in the string,
# use double quotes
"I'd say \"hi!\""
String Manipulation with stringr in R