Hello, I have a code that perfectly works.
I use an csv file to load the data and transform it as a data frame.
I have checked how to create a shiny app, and I have put the inputs of the functions in the ui part.
For example, I wrote:
numericInput(
inputId = "ni",
label = "Número de instrumentos:",
min = 1,
max = 10,
value = 2),
the same with the others parameters.
So, in the server part I wrote that input as:
ni <-reactive(input$ni)
Whitout the reactive, I get an error. And everything works well!
The problem is that when I try to use those parameters in a function (how it worked before as a simple code) like:
tiie(datos = data,pilar=pila,inicio = input$ini,convencion = conv, indicadora = indi, plazopagos = ppf)
I get errors!
Error in datos$fecha : object of type 'closure' is not subsettable
I have checked about that error, is related about if I try to use a variable like a data frame or something like that.
I imagine that the problem is in this line, inside of the function:
renglon<-which(datos$fecha==inicio)
I don't know what happen, or how do I could fix this.
I only want to transform the parameters into an input and then use them in the rest of the code as before.
Help please.
By the way, if I write:
tiie(datos = data,pilar=pila,inicio = ini,convencion = conv, indicadora = indi, plazopagos = ppf)
I get:
Error in matchSignature(signature, fdef) :
more elements in the method signature (2) than in the generic signature (1) for function ‘asJSON’