I've tried every quote/escape syntax I can think of but find that periods in the names of R dataframes cause sqldf to throw an unexpect (to me) error.
Viz:
``` R
> sqldf('select * from cars limit 2')
speed dist
1 4 2
2 4 10
# what we expect
> cars_df<-cars
> sqldf('select * from cars_df limit 2')
speed dist
1 4 2
2 4 10
# so far so go
> cars.df<-cars
> sqldf('select * from cars.df limit 2')
Error in result_create(conn@ptr, statement) : no such table: cars.df
# not sure why it fails
# let's try some escaping:
> sqldf('select * from "cars.df" limit 2')
Error in paste("sqldf:", "table", nam, "already in", dbname, "\n") :
argument "dbname" is missing, with no default
# erhm, no good, how about:
> sqldf('select * from [cars.df] limit 2')
Error in paste("sqldf:", "table", nam, "already in", dbname, "\n") :
argument "dbname" is missing, with no default
# foo!
# how about:
> sqldf('select * from `cars.df` limit 2')
Error in paste("sqldf:", "table", nam, "already in", dbname, "\n") :
argument "dbname" is missing, with no default
```
Is there an approach that will work, or do I have to change my (arguably non-standard) variable naming convention?
Thanks!
P.S. also submitted as github issue [BUG? sqldf dataframe can not have periods in their name](
https://github.com/ggrothendieck/sqldf/issues/33)