[R] Limited output

Seth Falcon seth at userprimary.net
Mon Aug 16 02:15:12 CEST 2010


Hi,

On 7/21/10 1:58 AM, confusedcius wrote:
> 
> The details of my problem are as follows:
> I have an sql that returns 2192 rows in sqlite.
> In R, I typed the following:
>> library("RSQLite")
>> con <- dbConnect(dbDriver("SQLite"), dbname = "C:\\sqlite\\... .sqlite")
>> dbListTables(con)
> #[1] "tbl_n..."      "tbl_s..."#
>> cur <- dbSendQuery(con,"select ... from tbl_n... where... ")
>> bru <- fetch(cur)
>> bru
> 
> This returns the first 500 of the 2192 rows of sqlite.

See the help page for fetch.  If you want all of the rows at once, you
can say: fetch(cur, n=-1)

If you want all the rows at once you can use dbGetQuery instead and skip
dealing with the result set and fetch.

Or you can call fetch again and get the next 500 rows...

+ seth



More information about the R-help mailing list