powered by
Work around different treatment of character types accross remote data soures when adding a constant column to a table. Deals with issues such as Postgresql requiring a charcater-cast and MySQL not allowing such.
addConstantColumn(d, colName, val, ..., tempNameGenerator = mk_tmp_name_source("replyr_addConstantColumn"))
data.frame like object to add column to.
character, name of column to add.
scalar, value to add.
force later arguments to be bound by name.
temp name generator produced by wrapr::mk_tmp_name_source, used to record dplyr::compute() effects.
table with new column added.
# NOT RUN { d <- data.frame(x= c(1:3)) addConstantColumn(d, 'newCol', 'newVal') # }
Run the code above in your browser using DataLab