Goal: Write a piece of R code that you could use to teach a seven-year-old child about Boolean logic (AND, OR, NOT).

Steps : (1) Brainstorm a scenario that could could use to implement boolean logic. (2) Find the appropitate notations for each conditional** (3) Write three conditional statements that will evaluate the three boolean conditionals.

An example…

Let’s assume we have sheep (sallysheep and mollysheep) with different color fleece (black and white) and two pastures (pasture1 and pasture2). In this scenario we want to sort the sheep into the pastures based on their fleece matching the color accepted by the pasture.

Lab Instructions
- Work with your partner to complete the lab
- A link to the .rmd can be found in the syllabus under week 1 section
- Be sure to include the names of all group members in the YAML header
- Need help??? Ping me on Zoom

Week 1 overview

R/R Studio e.g., using base R functions such as mean() and length()

Creating objects and assigning values e.g., name <- "Corey" or age <- 31

Vector math e.g., age + 5

Boolean logic e.g., &,|, and !

Writing conditionals statements e.g., ifelse()

Next Week

Asynchronous Session

Submit your lab and homwork 1 via the LMS. Be sure to include names in the YAML header. All documents must be in either a .docx, .pdf, or .html (not nb.html)