There should be some pretty way to do this however, one way is by splitting each word and lowering all the characters of the word except the first one and then paste
the string back.
paste0(sapply(strsplit(text, " ")[[1]], function(x)
paste0(substr(x, 1, 1),tolower(substr(x, 2, nchar(x))))), collapse = " ")
#[1] "This String Is a test. Trying To find a way to do This."
Detailed step by step explanation :
strsplit(text, " ")[[1]]
#[1] "This" "String" "IS" "a" "tESt." "TRYING" "TO" "fINd"
# [9] "a" "waY" "to" "do" "ThiS."
sapply(strsplit(text, " ")[[1]], function(x)
paste0(substr(x, 1, 1),tolower(substr(x, 2, nchar(x)))))
# This String IS a tESt. TRYING TO fINd
# "This" "String" "Is" "a" "test." "Trying" "To" "find"
# a waY to do ThiS.
# "a" "way" "to" "do" "This."
paste0(sapply(strsplit(text, " ")[[1]], function(x)
paste0(substr(x, 1, 1),tolower(substr(x, 2, nchar(x))))), collapse = " ")
#[1] "This String Is a test. Trying To find a way to do This."