I am newbie trying to understand how R and PostgreSQL can talk to each other. I have used R lately only for data analysis but now, I am trying to import directly from a database. I have installed RPostgreSQL and have connected to my database, I can see all the tables but I cannot edit them. I would like get some data out of them but when I run the
the following code:
>query<-"SELECT * FROM Events"
> rs <- dbSendQuery(con,query)
Error in postgresqlExecStatement(conn, statement, ...) :
RS-DBI driver: (could not Retrieve the result : ERROR: relation "events" does not exist
LINE 1: SELECT * FROM Events
My other table names are not great either.
“Alarm_Reports” ,”Configuration”,”Event_Details”,”Events”
Is there something basic about addressing the tables that I am missing?
Thanks for all the help.
As I mentioned in my comment, quotes may be needed. Here is actual code from one of our unit tests files: