Message-ID: <alpine.LNX.2.20.2109140836560.306@salmo.appl-ecosys.com>
Date: 2021-09-14T15:41:15Z
From: Rich Shepard
Subject: Need fresh eyes to see what I'm missing
In-Reply-To: <CAGgJW77k1bhrArSuosOaVi4cfXqM=xPZiAD_Fg7xEKpBWxHLiQ@mail.gmail.com>
On Tue, 14 Sep 2021, Eric Berger wrote:
> Before you create vel_by_month you can check vel for NAs and NaNs by
>
> sum(is.na(vel))
> sum(unlist(lapply(vel,is.nan)))
Eric,
There should not be any missing values in the data file. Regardless, I added
those lines to the script and it made no difference.
Running those commands on the R command line showed these results:
> sum(is.na(vel))
[1] 2321
> sum(unlist(lapply(vel,is.nan)))
[1] 0
Yet the monthly summaries retain the initial line:
> vel_by_month
# A tibble: 67 ? 3
# Groups: year [8]
year month flow
<int> <int> <dbl>
1 0 NA NaN
I've another data set with the same issue (that's 2 out of 5) and I assume
the source of the problem is the same with both.
The data sets have no NAs or missing values at the end of a line.
Thanks for the ideas,
Rich