Wednesday, 25 September 2013

How to handle column names not supported by sqldf in R

How to handle column names not supported by sqldf in R

I've a data frame where some of the column names are of the format .
format. For ex: Company.1 when i'm using that column in a sqldf function
it throws an error
data=sqldf(select Company.1 from test)
Error in sqliteExecStatement(con, statement, bind.data) :
RS-DBI driver: (error in statement: near ".1": syntax error)
Any workaround so that i can use the column name as it is?

No comments:

Post a Comment