...
resimrrsummary <- as.data.frame(rbind(summary(resimrr98$TOTALAMT))) # a simple summary function cast as a dataframe within my function
colnames(resimrrsummary) <- c("min", "first_qu", "median", "mean", "third_qu", "max") # I reworked the column names because I was getting errors with column names like '1st Qu.'"
Below "Summary" is Table in "mydb"
sqldf("update Summary
set min = resimrrsummary$min,
first_qu = resimrrsummary$first_qu,
median = resimrrsummary$median,
mean = resimrrsummary$mean,
third_qu = resimrrsummary$third_qu,
max = resimrrsummary$max
where segment = 'ResiMRR98'", dbname="mydb")
Error: RS-DBI driver: (error in statement: no such column: resimrrsummary$min).
In my function just prior to this sqldf call I print the contents of resimrrsummary and all looks good.
Stumped???