Here is my code:
dbSendQuery(con, "create table origdata (day1 numeric, day2 numeric, day3 numeric, day4 numeric, day5 numeric, day6 numeric, day7 numeric, day8 numeric, day9 numeric, day10 numeric);") #3.4 data=data.frame(origData) data[is.na(data)]=0 dbWriteTable(con, "origdata", value=origData, row.names =F,append = T) But I am getting the error : Error in postgresqlpqExec(new.con, sql4) : RS-DBI driver: (could not Retrieve the result : ERROR: column "X1" of relation "origdata" does not exist )
and part of my data frame for reference. 
How can I get it to read the values from my data frame in to the table origdata? I need the columns to have those labels.