You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug is probably on the dplyr side, but I figured I would bring it to your attention anyway. The bind_rows command contained in collapse_hcd chews up the yearmon data in the Date column for monthly data:
> l <- read_hcd(f)
> l
# A tibble: 192 × 12
Date MaxTemp MinTemp MeanTemp ExtremeHigh ExtremeLow TotalRain TotalSnow TotalPrecip
<S3: yearmon> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Jan 1956 NA NA NA NA NA NA NA NA
2 Feb 1956 NA NA NA NA NA NA NA NA
3 Mar 1956 NA NA NA NA NA NA NA NA
4 Apr 1956 NA NA NA NA NA 84.6 2.8 87.4
5 May 1956 NA NA NA NA NA 115.3 0.0 115.3
6 Jun 1956 NA NA NA NA NA 37.3 0.0 37.3
7 Jul 1956 NA NA NA NA NA 77.0 0.0 77.0
8 Aug 1956 NA NA NA NA NA 221.5 0.0 221.5
9 Sep 1956 NA NA NA NA NA 55.4 0.0 55.4
10 Oct 1956 NA NA NA NA NA 29.7 0.0 29.7
# ... with 182 more rows, and 3 more variables: LastSnowGrnd <int>, MaxGustDir <int>,
# MaxGustSpeed <chr>
> l <- bind_rows(l)
> l
# A tibble: 192 × 12
Date MaxTemp MinTemp MeanTemp ExtremeHigh ExtremeLow TotalRain TotalSnow TotalPrecip
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 1956.000 NA NA NA NA NA NA NA NA
2 1956.083 NA NA NA NA NA NA NA NA
3 1956.167 NA NA NA NA NA NA NA NA
4 1956.250 NA NA NA NA NA 84.6 2.8 87.4
5 1956.333 NA NA NA NA NA 115.3 0.0 115.3
6 1956.417 NA NA NA NA NA 37.3 0.0 37.3
7 1956.500 NA NA NA NA NA 77.0 0.0 77.0
8 1956.583 NA NA NA NA NA 221.5 0.0 221.5
9 1956.667 NA NA NA NA NA 55.4 0.0 55.4
10 1956.750 NA NA NA NA NA 29.7 0.0 29.7
# ... with 182 more rows, and 3 more variables: LastSnowGrnd <int>, MaxGustDir <int>,
# MaxGustSpeed <chr>
We can put it back to normal by re-running l$Date <- as.yearmon(l$Date). Fix recommended in #14.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @ConorIA. It seems it is a missing "feature" in bind_rows() (I'd call this a bug, but...). I've added a comment to an existing open bug on dplyrtidyverse/dplyr#1829
This bug is probably on the
dplyr
side, but I figured I would bring it to your attention anyway. Thebind_rows
command contained incollapse_hcd
chews up theyearmon
data in the Date column for monthly data:We can put it back to normal by re-running
l$Date <- as.yearmon(l$Date)
. Fix recommended in #14.The text was updated successfully, but these errors were encountered: