Importing FIles with Extension .sqlite into R

后端 未结 2 530
囚心锁ツ
囚心锁ツ 2020-12-28 19:39

I have a SQLite database exported (as a sqlite format 3 file?) from Scraperwiki with the .sqlite file extension/file suffix.

How do I import it into R, presumably ma

2条回答
  •  孤独总比滥情好
    2020-12-28 20:18

    To anyone else that comes across this post, a nice way to do the loop from the top answer using the purr library is:

    lDataFrames <- map(tables, ~{
      dbGetQuery(conn=con, statement=paste("SELECT * FROM '", .x, "'", sep=""))
    })
    

    Also means you don't have to do:

    lDataFrames <- vector("list", length=length(tables))
    

提交回复
热议问题