简体   繁体   中英

How visualize tbl_sql data using ggplot2?

I'm getting the error, ggplot2 does not know how to deal with data of class tbl_sqlite/tbl_sql/tbl_lazy/tbl . Does this mean I need to reduce the size of my data or convert it to another format before I can plot it?

dplyr holds off on actually collecting the data into r until it is explicitly told to. When using dplyr to query a database, be sure to use collect at the end of the chain to pull the query result into r as a data frame.

addendum : the dbplot package now provides helper functions to work with dplyr & dbplyr to do some plotting or calculations for intermediate plotting steps in-database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM