Description Usage Arguments Details Value Note Author(s) Examples
View source: R/get_votes_table.R
Function get_votes_table
imports votes table from a database.
1 2 3 | get_votes_table(dbname = 'sejmrp', user = 'reader',
password = 'qux94874', host = 'services.mini.pw.edu.pl',
sorted_by_id = TRUE, windows = .Platform$OS.type == 'windows')
|
dbname |
name of database; default: 'sejmrp' |
user |
name of user; default: 'reader' |
password |
password of database; default: 'qux94874' |
host |
name of host; default: 'services.mini.pw.edu.pl' |
sorted_by_id |
information if table should be sorted by id; default: TRUE |
windows |
information of used operation system; default: .Platform$OS.type == 'windows' |
Function get_votes_table
imports votes table from a database.
The result of this function is a data frame with votes' data. Because of
encoding issue on Windows operation system, you need to select if you use Windows.
data frame
Default parameters use privilages of 'reader'. It can only SELECT data from database.
All information is stored in PostgreSQL database.
Piotr Smuda
1 2 3 4 5 6 7 8 9 | ## Not run:
votes <- get_votes_table()
dim(votes)
# [1] 2826483 6
names(votes)
# [1] 'id_vote' 'nr_term_of_office' 'id_deputy' 'id_voting' 'vote' 'club'
object.size(votes)
# 90474040 bytes
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.