I have built a shiny app in which my inputs only recognize numeric values. For example, in the text box I insert 2^7 and it doesn´t perform the procedure in my function from the R code. On the other hand if I insert 128 it does perform the procedure.
library(shiny)
library(shinythemes)
library(shinydashboard)
library(stringr)
library(ggplot2)     
ui = navbarPage(
  theme = shinytheme("superhero"),
  title = "Generador de Numeros Aleatorios",
         tabPanel(title = h5("Generadores"),
sidebarPanel(
  selectInput("metodo", "Selecciona el m?todo",
              selected= "Multiplicativo",
              choices = c("Multiplicativo","Lineal","SimuladorR")
  ),
  textInput("z0","Ingresa una semilla:",value = 3),
  texticInput("n","Ingresa 'n':",value=10),
  textInput("a","Ingresa 'a':",value=2),
  textInput("m","Ingresa 'm':", value=15),
  textInput("c","Ingresa 'c':",value=10),
  actionButton("generador", label = "Generar"),
  br(),
  radioButtons("type", "Formato de descarga:",
               choices=c("Excel(CVS)", "Text(TSV)"),selected = "Excel(CVS)", inline=T),
  helpText("Click en el boton de Exportar para descragar los datos."),
  downloadButton('downloaddata','Exportar')
  #downloadButton("exportador", label = "Exportar")
  #actionButton("exportador", label = "Exportar"),
  #br(),
  #helpText("Click en el boton de Exportar para descargar los datos"),
), #Cierra sidebarPanel
mainPanel(
  h5("Valores Generados:"),
  plotOutput("grafica"),
  tableOutput("tablaValores")
) #Cierra mainPanel
   ),   
server = function(input, output,session){
 ## Generador Multiplicativo
  Congruencial.Multiplicativo = function(z0,a,m,n){
   z<-c()
   u<-c()
   z[1]<-z0
   u[1]<-z[1]/m
   if(n>1){
     for (i in 1:n+1) {
       z[i]<-(a*z[i-1]) - floor((a*z[i-1])/m)*m
     }
     for(i in 1:n+1){
       u[i]<-z[i]/m
     }
   }
   return(u[-1])
  }
  ## Generador Lineal
  Congruencial.Lineal<-function(z0,m,a,c,n){
    z=c()
    k=c()
    u=c()
    z[1]=z0
    k[1]=floor(((a*z[1])+c)/m)
    for(i in seq(2,n+1,by=1)){
      z[i]=((a*z[i-1])+c)-(m*k[i-1])
      k[i]=floor(((a*z[i])+c)/m)
      u[i]=z[i]/m
      }
      return(u[-1])
  }
   ## Generador de R
    Simulador.R = function(n){
      r<-runif(n=n,min=0,max=1)
      return(r)
     }
   ### Ahora para mostrar los valores guardados:
   observeEvent(input$generador, { 
    output$grafica = renderPlot ({
      datos = valores()
      datos = as.data.frame(datos)
     ggplot(datos)+geom_histogram(aes(x=datos,y=..density..),
                               breaks=seq(0, 1, .01),closed="left",
                               color="white", fill="orange")+
       labs(title="Funcion de Densidad",
            x=" x ", 
            y = "Densidad"
        )+theme_bw()+
        scale_x_continuous(breaks =seq(0, 1, 0.1))+
        scale_y_continuous(breaks =seq(0, 1, 0.1))+
        stat_function(fun=dunif,xlim=c(-.5,1.5),size=1,color="red",
                  args =list(min=0, max=1) )
    })
   valores = reactive({ switch (input$metodo, 
   Multiplicativo = 
   Congruencial.Multiplicativo(input$z0,input$a,input$m,input$n),
   Lineal = Congruencial.Lineal(input$z0,input$m,input$a,input$c,input$n),
   SimuladorR = Simulador.R(input$n) )})   #Cierra valores
   numord = valores() #Llamamos los valores aleatorios generados
   mostrar = as.data.frame(cbind(seq(1,input$n,by=1),numord))
   colnames(mostrar)=c("i", "u")
   output$tablaValores = renderTable(mostrar)
  }) #Cierra observeEvent
Now this is part of the code in which I need the text input to be recognized as numeric so that the app can work. The values I need the app to read as a string and turn them into numeric are z0, n, m, c. I have tried to put them into the observe event and neither they work.
The app creates a series of semirandom values with generators, that need some entry values which are specified in the paragraph above.
 
     
    