Tom K. answered 11/01/20
Knowledgeable and Friendly Math and Statistics Tutor
sum(mike == cole)
sum(mike != cole)
You may have to be careful with how you handle NAs.
Jami H.
asked 11/01/20##### (b) comparing vectors
> Given two users's preferences between two options: [Facebook, Instagram], [Firefox, Chrome], [Mac, PC], [Summer, Winter].
- how many things do they aggree on and how many do they not?
```{r, eval = TRUE}
mike <- c("Instagram", "Chrome", "Mac", "Summer")
cole <- c("Facebook", "Chrome", "PC", "Winter")
same_n # edit me
same_n
diff_n
diff_n
```
Tom K. answered 11/01/20
Knowledgeable and Friendly Math and Statistics Tutor
sum(mike == cole)
sum(mike != cole)
You may have to be careful with how you handle NAs.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Jami H.
Thank you!11/01/20