Reverse String in R (original) (raw)
Sample Programs in Every Language
A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Published on 19 October 2020 (Updated: 19 October 2020)
Welcome to the Reverse String in R page! Here, you'll find the source code for this program as well as a description of how the program works.
Current Solution
args<- commandArgs(TRUE)
if(length(args) > 0 ){
if (args[1] != ""){
splits <- strsplit(args, "")[[1]]
reversed <- rev(splits)
reversed <-as.character(rev(splits))
j <- paste(reversed, collapse = '')
cat(noquote(j))
}
}
Reverse String in R was written by:
- Veena ManikPrabhu
If you see anything you'd like to change or update, please consider contributing.
How to Implement the Solution
No 'How to Implement the Solution' section available. Please consider contributing.
How to Run the Solution
No 'How to Run the Solution' section available. Please consider contributing.