Вы имеете в виду что-то подобное?Или что-то более модное?;)
library(shiny)
library(stringi)
ui <- fluidPage(
textInput("textin", "Enter Text"),
textOutput("text")
)
server <- function(input, output) {
output$text <- renderText({
textout <- input$textin
textout <- paste(stri_sub(textout, 1, 3),".",
stri_sub(textout, 4, 6), ".",
stri_sub(textout, 7, 9), "-",
stri_sub(textout, 10, 12), ".",
stri_sub(textout, 13, 14), ".")
print(textout)
})
}
shinyApp(ui, server)