data_URL <- "https://github.com/mca91/EconometricsWithR/blob/master/data/fastfood.dta?raw=true" # attach the packages # read in the dataset and assign it to `dat` # add FTE and FTE2 to `dat` # attach the packages library(dplyr) library(foreign) # read in the dataset and assign it to `dat` dat <- read.dta(data_URL) # add FTE and FTE2 to `dat` dat <- dat %>% mutate(FTE = nmgrs + empft + (0.5 * emppt), FTE2 = nmgrs2 + empft2 + (0.5 * emppt2)) ex() %>% check_library("foreign") ex() %>% check_library("dplyr") ex() %>% check_object("dat", undefined_msg = "You have not defined `dat`!") %>% check_equal() success_msg(msg = "Correct!",praise = T)