Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 202012

R: Include only business day observations in a data frame with observations for all days

$
0
0

I have a data frame with a date column and two columns of observations. I want to create a new data frame where only the observations that are from business days are included.

I tried df=df[which(weekdays.Date(as.Date.dates(df$Date, format = "%Y-%m-%d")) %in% c('Rmetrics/NYSE')), ] to only include rows that contain dates that are in the NYSE calendar. This did not work.


Viewing all articles
Browse latest Browse all 202012

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>