Note that there are some explanatory texts on larger screens.

plurals
  1. POExporting Table from R to PostgreSQL by RPostgreSQL
    primarykey
    data
    text
    <p>I am using <em>RPostgreSQL</em> I have done number of process and I got a table in R. I wanted to put this table in PostgreSQL from R for further analysis that I will use PostgreSQL codes. The problem is that when I have a table in R which doesn't exist in PostgreSQL, I cannot perform SQL Codes on it.</p> <p>Sample Table s_2 the data format is not data frame and temp is float and DateeTIMEE is timestamps:</p> <pre><code> temp DateeTIMEE 1 -1.64 2007-09-29 00:01:09 2 -1.76 2007-09-29 00:03:09 3 -1.83 2007-09-29 00:05:09 4 -1.86 2007-09-29 00:07:09 5 -1.94 2007-09-29 00:09:09 6 -1.87 2007-09-29 00:11:09 7 -1.87 2007-09-29 00:13:09 8 -1.80 2007-09-29 00:15:09 9 -1.64 2007-09-29 00:17:09 10 -1.60 2007-09-29 00:19:09 11 -1.90 2007-09-29 00:21:09 12 -2.08 2007-09-29 00:23:09 13 -1.94 2007-09-29 00:25:09 14 -2.12 2007-09-29 00:27:09 15 -1.87 2007-09-29 00:29:09 16 -2.18 2007-09-29 00:31:09 17 -1.98 2007-09-29 00:33:09 18 -1.73 2007-09-29 00:35:09 19 -1.84 2007-09-29 00:37:09 20 -2.04 2007-09-29 00:39:09 21 -1.86 2007-09-29 00:41:09 22 -1.94 2007-09-29 00:43:09 23 -1.77 2007-09-29 00:45:09 24 -1.78 2007-09-29 00:47:09 25 -1.50 2007-09-29 00:49:09 26 -1.46 2007-09-29 00:51:09 27 -1.72 2007-09-29 00:53:09 28 -1.67 2007-09-29 00:55:09 29 -1.56 2007-09-29 00:57:09 30 -1.69 2007-09-29 00:59:09 31 -1.97 2007-09-29 01:01:09 32 -1.79 2007-09-29 01:03:09 33 -1.79 2007-09-29 01:05:09 34 -1.84 2007-09-29 01:07:09 35 -1.91 2007-09-29 01:09:09 36 -1.87 2007-09-29 01:11:09 37 -1.98 2007-09-29 01:13:09 38 -1.83 2007-09-29 01:15:09 39 -1.88 2007-09-29 01:17:09 40 -1.88 2007-09-29 01:19:09 </code></pre> <p>I have tries following code:</p> <pre><code>library(sqldf) sqldf("select * from s_2 where temp &gt; -1 ") </code></pre> <p>but I came up with this error:</p> <pre><code> Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (could not connect postgres@localhost on dbname "test" ) Error in !dbPreExists : invalid argument type. </code></pre> <p>Moreover, could I use table s_2 in this syntax while it is a temporary variable in R and doesn't exist in db?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload