## Not run:
# # Take a substring, counting from the end:
# substrfromend <- function(x,start,stop)revchar(substr(revchar(x),start,stop))
# substrfromend('filename.txt', 1,3)
#
# # Check if a word is a palindrome:
# s <- 'saippuakivikauppias'
# s == revchar(s)
#
# # A semordnilap:
# cat('I am so stressed, I need to eat', revchar('stressed'),'\n')
# ## End(Not run)
Run the code above in your browser using DataLab