You will most likely want to read the documentation for the function you are using at ?sqlQuery
, which includes notes about the following two relevant arguments:
as.is which (if any) columns returned as character should be converted to another type? Allowed values are as for read.table. See ‘Details’.
and
stringsAsFactors logical: should columns returned as character and not excluded by as.is and not converted to anything else be converted to factors?
In all likelihood you want to specify the columns in questions in as.is
.