[R] error message from sqldf

José María Mateos chema at rinzewind.org
Sat Mar 10 22:53:35 CET 2018


On Sat, Mar 10, 2018 at 09:30:42PM +0000, Ding, Yuan Chun wrote:
> chr10 <- sqldf("select * from manifest where CHR==10")
> 
> UCN3cpg <-  sqldf("select * from chr10 where MAPINFO between 5405573 and 5407594),
> overwrite = TRUE")
> Error: Table chr10 exists in database, and both overwrite and append are FALSE

Could it be that `chr10` already exists when you try to run your code. 
What about rewriting it as:

chr10 <- sqldf("select * from manifest where CHR==10", overwrite = TRUE)

Also, it seems to me that the second line is not closing the quotes 
properly. Shouldn't this be correct instead?

UCN3cpg <-  sqldf("select * from chr10 where MAPINFO between 5405573 and 5407594",
                  overwrite = TRUE)

Cheers,

-- 
José María (Chema) Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en



More information about the R-help mailing list