[R] How to dbReadTable() only a limited number of rows? (RMySQL)

Orvalho Augusto orvaquim at gmail.com
Fri Dec 25 15:10:42 CET 2009


Try this
>drv <- dbDriver("MySQL")
>con(drv, etc parameters...)
> dbGetQuery(con, "select * from tableyoulike limit N_integer_first_records")

Hope it helps
Caveman


On Fri, Dec 25, 2009 at 12:10 AM, Peng Yu <pengyu.ut at gmail.com> wrote:
> I only want to load a limited number of rows by dbReadTable(). I don't
> see an option in the help. Is there an option to do so?
>
> ______________________________________________
> R-help at 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.
>



-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaquim at cenfoss.co.mz
cell: +258828810980




More information about the R-help mailing list