I have two data frames and I'm asked to calculate the sub-total before discount. I tried to multiply Prices column with Quantities column from the first data frame and then add Delivery Fee from second data frame with R code
Order <- transform( Order, Sub_Total_Before_Discount=((raw$Prices * raw$Quantities) + Order$Delivery_Fee) )
and it returns error
Error in raw$Prices * raw$Quantities : non-numeric argument to binary operator
I'm still new to R so please help me if there's any way to calculate this. Thank you so much.