## Not run:
# # Example 1
# x <- mean(1:3, na.rm = TRUE)
#
# # SCT option 1
# test_object("x")
#
# # SCT option 2
# ex() %>% check_object("x") %>% check_equal()
#
# # Example 2
# x <- mean(1:3, na.rm = TRUE)
#
# # SCT option 1 to only check existence of x
# test_object("x", eval = FALSE)
#
# # SCT option 2 to only check existence of x
# ex() %>% check_object("x")
#
# # Example 3
# df <- data.frame(a = 1:3, b = LETTERS[1:3])
#
# # SCT option 1 to test column a
# test_data_frame("df", columns = "a")
#
# # SCT option 2 to test column a
# ex() %>% check_object("df") %>% check_column("a") %>% check_equal()
#
# # Example 4
# lst <- list(a = 1, b = 2)
#
# # SCT to test only element b
# ex() %>% check_object("lst") %>% check_element("b") %>% check_equal()
# ## End(Not run)
Run the code above in your browser using DataLab