mardi 16 février 2016

Import column with large int values from sqlite

I have a sqlite DB that includes columns with int values that are too big for R to handle. Is it still possible to import those columns in R in a way that those big int values will not be converted in a strange way?

What i do so far:

library(DBI)
library(RSQLite)
library(data.table)

# connect to the sqlite file
con <- dbConnect(RSQLite::SQLite(), 'test.sqlite')
# get the perormance_data as a data.frame -> data.table
p1 = dbGetQuery(con,'
SELECT
    Post.post_id,
    Post.created_time
FROM
    Post
            ')
p1 <- as.data.table(p1)

The post_id-column includes large int values for example.

Aucun commentaire:

Enregistrer un commentaire