The system cannot find the file specified in R

Hi All--

I have a simple code using swmmr package.My code is below.I tried the code on my computers but i kept getting the error.
here is my code and the error message.
Any help is greatly appreciated.
install.packages("swmmr")
inp_path <- system.file("extdata", "Example1.inp", package = "swmmr", mustWork = TRUE)
inp <- read_inp(x = inp_path)
files <- run_swmm(inp = inp_path)

Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/Program Files/R/R-3.6.1/library/swmmr/extdata/Example1.rpt": The system cannot find the file specified
2: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/Program Files/R/R-3.6.1/library/swmmr/extdata/Example1.out": The system cannot find the file specified

This worked for me:

inp_path <- system.file("extdata", "Example1.inp", package = "swmmr", mustWork = TRUE)
file.exists(inp_path)  #[1] TRUE

Is the package installing successfully?

"swmmr" %in% installed.packages()[,"Package"]  #[1] TRUE

If that is the case, perhaps the problem lies in the function read_inp

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.