massbays-tech / MassWateR

R package for working with Massachusetts surface water quality data
https://massbays-tech.github.io/MassWateR
Creative Commons Zero v1.0 Universal
11 stars 3 forks source link

How to load my own results file #13

Closed ben-wetherill closed 2 years ago

ben-wetherill commented 2 years ago

How would I load my own results file? I tried replacing the respth argument with a local path, but it doesn't seem to work.

respth <- "D:/Documents/ExampleResults_final_4-28-22.xls"
resdat <- read_results(respth)
Error: `path` does not exist: ‘D:/Documents/ExampleResults_final_4-28-22.xls’
fawda123 commented 2 years ago

@ben-wetherill, that should work... is the path right? What happens when you run this?

file.exists(""D:/Documents/ExampleResults_final_4-28-22.xls")
ben-wetherill commented 2 years ago

You're right. The path was wrong. I had the wrong suffix .xls instead of .xlsx. read_results() worked with my file, but it still wanted the column heading of Results Depth Category. This needs to be changed to Activity Relative Depth Name.

fawda123 commented 2 years ago

@ben-wetherill good, glad that was sorted. Do you mean the column G header name should be "Activity Relative Depth Name" instead of "Relative Depth Category"? If so, I can change the system file and the check in check_results(). image

ben-wetherill commented 2 years ago

Yes. That's correct.