Re: [R] Limited output
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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Limited output
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. If I then type options()$max.print I get #[1] 9# And from str(bru) I get #'data.frame': 500 obs. of 2 variables: $ vbl1 : chr... $ vbl2 : num...# By the way, I appreciate your help! -- View this message in context: http://r.789695.n4.nabble.com/Limited-output-tp2295882p2296795.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Limited output
I just found the solution... I used dbGetQuery instead of dbSendQuery. That's a more direct approach and it works. Thanks again for your help. -- View this message in context: http://r.789695.n4.nabble.com/Limited-output-tp2295882p2296822.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Limited output
Hi there, I entered over 2000 lines of data into R from SQLite and saved it in R as a data.frame, but the data.frame only gives the first 500 lines. Is there any way to either increase the default limit or to determine which of the original lines should be in the output (e.g. maybe the last 500 instead of the first 500)? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Limited-output-tp2295882p2295882.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Limited output
On Jul 20, 2010, at 1:05 PM, confusedcius wrote: Hi there, I entered over 2000 lines of data into R from SQLite How? and saved it in R as a data.frame, How? but the data.frame only gives the first 500 lines. Is there any way to either increase the default limit or to determine which of the original lines should be in the output (e.g. maybe the last 500 instead of the first 500)? There is no limit on the size of data.frames, Well, at least not anything near 500, anyway. I suspect that the limit is set by the maximum size of the (positive) integer data-type = 2*10^9 What does this return? options()$max.print # [1] 9 # which is the default And what does this return? str(your.data.frame) -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.