Dataframe using dplyr FILTER function yields a bunch of NA's and tells me it's a time series

(.packages())
[1] "graphics" "grDevices" "utils" "datasets" "xts" "magrittr" "formattable"
[8] "zoo" "stats" "forcats" "dplyr" "purrr" "readr" "tidyr"
[15] "tibble" "ggplot2" "tidyverse" "stringr" "lubridate" "methods" "base"
class(dfr)
[1] "data.frame"
dfrcol <- names(dfr)
dfrcol
[1] "dates" "open" "high" "low" "close" "vol" "dfr.range" "dow"
filter(dfr, dow = "Mon")
Error in filter(dfr, dow = "Mon") : unused argument (dow = "Mon")
filter(dfr, dow == "Mon")
Time Series:
Start = 1
End = 263
Frequency = 1
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 NA NA NA NA NA NA NA NA
4 NA NA NA NA NA NA NA NA

What happens if you run

dplyr::filter(dfr, dow == "Mon")

What could cause the base packages to get attached after the tidyverse, which is causing stats::filter() to mask dplyr:: filter() in this case?

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.