I have the following line:
Getty <- "Four score and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal."
I want to display the first 10 characters. So I started by breaking the string into separate characters:
split <- strsplit(Getty, split="") split
I get all individual characters like this item. Then I create a substring of the first 10 characters.
first.10 <- substr(split, start=1, stop=10) first.10
And here is the conclusion:
"c(\"F\", \"o\""
I do not understand why this is printing? I thought it would just print something like:
"F" "o" "u" "r" "s"
Is there a way to change my code to print what I have above?
Thanks everyone!
source share