-
-
Save FFFiend/98e09e0669b8be40fb4d5c5ad290cf14 to your computer and use it in GitHub Desktop.
Owais Quiz 4a Q2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set.seed(71) | |
num_friends = 20 | |
edward_measurements <- rnorm(num_friends, mean = 180, sd = 5) | |
hugo_measurements <- rnorm(num_friends, mean = 180, sd = 11) | |
lucy_measurements <- rnorm(num_friends, mean = 180, sd = 7) | |
height_data <- data.frame( | |
Edward = edward_measurements, | |
Hugo = hugo_measurements, | |
Lucy = lucy_measurements | |
) | |
# dataframe showing measurements from Edward, Hugo and Lucy for each student. | |
print(height_data) | |
if(max(select(height_data,Edward) <= 200)){ | |
print(TRUE) | |
}else{ | |
print(FALSE) | |
} | |
if(max(select(height_data,Lucy) <= 200)){ | |
print(TRUE) | |
}else{ | |
print(FALSE) | |
} | |
if(max(select(height_data,Hugo) <= 200)){ | |
print(TRUE) | |
}else{ | |
print(FALSE) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note on LLM usage: ChatGPT-3.5 was used to figure out parts of this question.
Here is the chat link: https://chat.openai.com/share/1a92da5f-9bfe-4082-945f-41655095e95f