I tried to create new variables from my data set. This is what I typed:
dt4w05S <- read.csv("w05S.csv")
dt4w05S <- dt4w05S %>%
mutate(productPriceUnit = RetailPriceUnit/1.13,
Revenue = SalesQuantityproductPriceUnit,
productCost = SalesQuantityproductCostUnit,
grossProfit = Revenue - productCost,
Day = weekdays(SalesDate))
Then it said: Error in UseMethod("weekdays") :
no applicable method for 'weekdays' applied to an object of class "factor"
Anyone knows how to fix this?