Hello, Guys! Could someone help me with this?
If i have a function...
funcao <- function(x){
Z <- x*3
}
i can do this... and it works
vector <- c(1,2,3)
Resultado <- funcao(vector)
I want to use the information of a tibble as argument to that function, like this...
tibble <-tribble(
~letras, ~numeros,
"a", c(1,2,3),
"b", c(2,3,4)
)
Resultado <- funcao(tibble[1,2])
What about if i have it in a string? Like this..
string <- text = "c(1,2,3)"
Resultado <- funcao(string)
Can somebody help me, please?
Thank you!