I connected to the database:
db = src_postgres(dbname = "a", host = "b", port = 5432, user = 'c', password = 'd')
tab = tbl(db, "table")
Then I try to count the number of rows in each group:
tab %>%
group_by(id) %>%
tally() %>%
arrange(desc(n))
Result:
id n
1 6.014e+18 13529622
2 6.014e+18 10906413
3 6.014e+18 8243263
4 6.011e+18 7472041
5 6.014e+18 7094833
6 6.012e+18 6730177
7 6.011e+18 6236673
8 6.011e+18 5924966
9 6.011e+18 4537380
10 6.011e+18 4393328
Is there a way to access a column idin text form? (something like id::TEXTwill do in the database)
source
share