I want to split the following string
"ATextIWantToDisplayWithSpaces"
like this
A Text I Want To Display With Spaces.
I tried this code in R
strsplit(x="ATextIWantToDisplayWithSpaces", split=[:upper:])
which produces this error
Error: unexpected '[' in "strsplit(x="ATextIWantToDisplayWithSpaces", split=["
Any help will be highly appreciated. Thanks