I am having difficulty with case sensitivity. Can we turn it off?
A1 <- c("a", "A", "a", "a", "A", "A", "a")
B1 <- c(rep("a", length(A1)))
A1 == B1
# [1] TRUE FALSE TRUE TRUE FALSE FALSE TRUE
should be all TRUE
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no way to turn off case sensitivity of
==, but coercing both character vectors to uppercase and then testing for equality amounts to the same thing: