Watts-College / cpp-528-spr-2022

https://watts-college.github.io/cpp-528-spr-2022/
0 stars 0 forks source link

Lab 03 project_data_steps.R error #11

Closed Johaning closed 2 years ago

Johaning commented 2 years ago

For Lab 03, I've saved the utilities.R and project_data_steps.R files, but am getting an error when running the project_data_steps.R file.

# for each relevant file, run the build_year() function ----
# note: this populates the data/rodeo/ directory with clean files
for (relevant_file in RELEVANT_FILES) {
  print(paste0("Starting on ", relevant_file[["year"]]))
  build_year(fn1 = relevant_file[["fullcount"]],
             fn2 = relevant_file[["sample"]],
             year = relevant_file[["year"]])
  if (relevant_file[["year"]] < 2010) {
    print("Finished! Moving onto the next decade.")
  } else {
    print("Finished! No more data to parse.")
  }
}

[1] "Starting on 1970"
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'C:/Users/johan/RStudio-all/CPP-528/data/raw': Permission denied

# load the crosswalk ----
# note: this stores a copy in the data/raw/ directory
cw <- obtain_crosswalk()

# create the final meta data file ----
# note: this stores a copy within the data/rodeo/ directory
create_final_metadata_file(file_names = RELEVANT_FILES,
                           crosswalk = cw)

Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'C:/Users/johan/RStudio-all/CPP-528/data/raw': Permission denied

(This comment has been edited for improved readability ~ @yukicruz )

yukicruz commented 2 years ago

This issue is being addressed in Issue #9