dexter-psychometrics / dexter

Management, assessment, and psychometric analysis of data from educational and psychological tests
GNU Lesser General Public License v3.0
8 stars 5 forks source link

Problem with open_project() #3

Closed frankbach closed 2 years ago

frankbach commented 2 years ago

When I try to use open_project() I get the following error message:

open_project("verbAggression.db")

Path: /Users/xbacfr/Documents/Projekt/NBP/R/bp/verbAggression.db Extensions: TRUE get_booklets(db) Error: Invalid or closed connection
jessekps commented 2 years ago

Hi Frank,

From that short snippet it seems like you are not saving the returned object from open_project anywhere in your environment. Perhaps try:

db = open_project("verbAggression.db")
get_booklets(db)

(assuming verbAggression.db is a valid dexter project and has some response data in it)

frankbach commented 2 years ago

Thanx!

I found another way that seems to be almost identical:

db <- dbConnect(db)

jessekps commented 2 years ago

They are not entirely identical. dbConnect will connect to a db to or create one if it does not yet exist, but in the second case it will not be a dexter db and that will plikely cause errors further on. Best to use open_project.