USGS-R / lakeReport

Scripts and report generator
Other
0 stars 4 forks source link

2 stage hydrographs didn't run #61

Closed sbmarsh-USGS closed 7 years ago

sbmarsh-USGS commented 7 years ago

05427235 - Lake Koshkonong and 430251088284700 - Wind Lake at Outlet Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called 'readr' In addition: Warning messages: 1: package ‘dplyr’ was built under R version 3.2.5 2: package 'readxl' was built under R version 3.2.5 Quitting from lines 6-13 (stagehydrograph.Rmd)

lindsayplatt commented 7 years ago

@sbmarsh-USGS try executing install.packages('readr') and then re-run. The error is telling you "there is no package called 'readr'" which means you need to install it!

sbmarsh-USGS commented 7 years ago

Done. One site fixed (05427235). Here's the other: FAILED REPORTS: siteNumber plotName 1 430251088284700 stagehydrograph Warning messages: 1: Unknown column 'dateTime' 2: In is.na(stage_data$dateTime) : is.na() applied to non-(list or vector) of type 'NULL' 3: Unknown column 'dateTime'

sbmarsh-USGS commented 7 years ago

Oops. This one is incorrect. I tried running a different site that is discontinued. But the other site still had issues: Quitting from lines 16-43 (stagehydrograph.Rmd)

0 reports successful

FAILED REPORTS: siteNumber plotName 1 424848088083100 stagehydrograph

sbmarsh-USGS commented 7 years ago

Actually, I do need plots for both of these sites: 430251088284700 (Middle Genesee) and 424848088083100 (Wind Lake) and they both bonk out on lines 16-43.

lindsayplatt commented 7 years ago

Try putting browser() into the code to figure out what the error on lines 16-43 actually is

sbmarsh-USGS commented 7 years ago

I stepped through this one and at line 42 got the following error:

Error: could not find function "read_excel"

lindsayplatt commented 7 years ago

That function is from the package readxl. You likely did not load the library with library(readxl) before running those lines!

sbmarsh-USGS commented 7 years ago

I could have sworn I re-ran that yesterday and put a comment here about my results...weird. Today when I do it, I get the following error messages. Shall I proceed or do I need to update packages? Attaching package: ‘dplyr’

The following objects are masked from ‘package:lubridate’:

intersect, setdiff, union

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Warning message: package ‘dplyr’ was built under R version 3.2.5

library(gsplot) This information is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The information has not received final approval by the U.S. Geological Survey (USGS) and is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the information. Although this software program has been used by the USGS, no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.

Attaching package: ‘gsplot’

The following objects are masked from ‘package:graphics’:

abline, arrows, axis, curve, grid, legend, lines, mtext, par, points, polygon, rect, segments,
symbols, text, title
lindsayplatt commented 7 years ago

Those aren't actually errors, just warnings. Go ahead with what you were doing!