Guided Project: Analyzing CIA Factbook Data Using SQLite and R

In mission 1. Overview of the Data i have copy the answer code into my Rstudio but it always shows a error message “error: no such table: facts”. anyone know what is the possible cause for this error?

thank you

Hi @zong,

It seems that the factbook.db file was missing from your working directory. So when you ran this code:

conn = dbConnect(RSQLite::SQLite(), "./factbook.db")

it created a new empty database file.

To fix this, first you have to find your present working directory by using getwd() function. Then go to the folder location and replace the empty factbook.db file with the file you downloaded from this page:

Or alternatively, you can use setwd() command to set the download location as your working directory.