0

Hi I have the same question as this post How do you explicitly delete a SQLite database created with the sqldf library in an R script

However, the user found the answer in a blog and put the link up but the link no longer works. Like the user, I don't understand where tables are stored and can't delete them. I've used the following commands with no success

sqldf("attach 'mydb' as new")
sqldf("create table mytable as SELECT * FROM mytable1", dbname="mydb")
file.remove("mytable")
sqldf("drop table mytable", dbname="mydb")

I get the error "sqldf: table mytable1 already in mydb"

xtna
  • 53
  • 5
  • Which line is causing the error? – HSchmale Sep 17 '18 at 15:08
  • The drop table line gives the error "sqldf: table mytable1 already in mydb". file.remove("mytable") gives error "cannot remove file 'mytable', reason 'No such file or directory'" – xtna Sep 17 '18 at 15:17

0 Answers0