ipeds icon indicating copy to clipboard operation
ipeds copied to clipboard

Downloading datasets not working with `here` package, but fine with `file.path`

Open jackdolgin opened this issue 4 years ago • 0 comments

Such a great package! Just thought it might be worth noting, for anyone else with the same issue, using the file directory package here seems to have issues interacting with this ipeds package.

For example,

library(tidyverse)
library(ipeds)
library(here)

# this downloads a .Rda file that is only 80 bytes large and is empty
options('ipeds.download.dir' = here("Data", "IPEDS"))
download_ipeds(year = 2012)

# trying URL 'https://nces.ed.gov/ipeds/tablefiles/zipfiles/IPEDS_2011-12_Final.zip'
# Content type 'application/x-zip-compressed' length 50987484 bytes (48.6 MB)
# ==================================================
# downloaded 48.6 MB
# 
# File not found
# Couldn't open database.
# Warning message:
# In system(paste("mdb-tables -1", file), intern = TRUE) :
#  running command 'mdb-tables -1 /Users/path/IPEDS201112.accdb' had status 1


# but the following downloads the correct files and information inside those files
options('ipeds.download.dir' = file.path("Data", "IPEDS"))
download_ipeds(year = 2012)

Note, I'm running this on a Mac 10.15.5 with R 4.0, and my ipeds versions is 2.0.2

jackdolgin avatar Jun 26 '20 05:06 jackdolgin