On 01/15/2010 01:49 AM, Bart Joosen wrote:
>
> One way could be to first select only the unique ID's, sample this and then
> select only the relevant records:
>
> strQuery = "SELECT ID from tblFoo;"
> IDs <- sqlQuery(channel, strQuery)
> sample.IDs <- sample(IDs,10)
> strQuery = paste("SELECT ID
One way could be to first select only the unique ID's, sample this and then
select only the relevant records:
strQuery = "SELECT ID from tblFoo;"
IDs <- sqlQuery(channel, strQuery)
sample.IDs <- sample(IDs,10)
strQuery = paste("SELECT ID from tblFoo WHRE ID IN(", sample.IDs, ");")
IDs <- sqlQuery
Hi Everybody
Is there a way in which one can use the RPostgreSQL package to take a sample
from a table in Postgres database without having to read the whole table
into R
regards
Christiaan
[[alternative HTML version deleted]]
__
R-help@r-proje
3 matches
Mail list logo