@Mathematics wrote:

Hello ...

I am using R shiny to develop mathematics APPS where I use the functionto convert string numbers from user to numeric inputs in R. For example, to accept the vector:eval(), I use thev = (3, 4/11, pi/2, sqrt(13))function then convert it to numeric values using .the following code.textInput`_v = as.character(input$v)_ _v = strsplit(v,",")_ _v = v[[1]]_ _vv = v_ _vi = rep(0,times = length(v))_ _for (i in 1:length(vv)){_ _ vi[i] = eval(parse(text = vv[i])) # convert to numeric ***_ _}_ _v = vi_`

My problem is that I read on Stackflow that

function should never be used if an R shiny app is to be hosted online. Is there a secure way to capture this input.eval()I also use the same to accept mathematical functions. For example, a user enters a function like

in the input field, then I convert it to an R function using the line below.exp(x) * sin(x)`_f = function(x) {eval(parse(text = input$func))}_`

Thank you for any help or suggestion.

Posts: 3

Participants: 2