I have a data frame where in some cells I have written R code with the intention of being able to call it and use it as executable code, but I cannot find a way to do it when I indicate the cell, the result is a text string and R does not recognize it as code. How can I do it?
I put a small example, without putting the whole table:
This is the value of the cell:
> Mod_Adje$Filtros[1]
[1] "T1$PeA[j] >= 80 & T1$PeIR[j] >= 50 "
This is the function where i would like to execute the cell value:
for (j in 1:length(T1$Num)) {
if (Modelo_Adje$Filtros[1])
T1$AdjetCom [j] <- “Result1”
else
T1$AdjetCom [j] <- “Result2”
}