I am trying to work using ROracle
to query the Oracle database within R
.
I have been able to store a table in an R
data.frame
, though I am facing the following issue.
Assuming the following data.frame
,
my_table <- data.frame(name = c("a","b"), surname = c("h", "i"), stuff = c("as", "qweq"))
My objective is to find a completely automated line(s) of code that convert to factor
all columns that are characters
and which name do not contain the string "name"
.
In this case, only stuff
should be converted to factor.