영어로 된 문자열을 모두 대문자로 바꾸거나 소문자로 바꿔야 할 경우가 있습니다. 그럴 때에는 toupper or tolower 아래와 같이 사용하면 됩니다. R에서 다음과 같이 입력 하시면 도움말을 보실 수 있습니다.
?toupper
?tolower
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
> test <- c("Test tesT") ##입력 | |
> test ## 확인 | |
[1] "Test tesT" | |
> tolower(test) ## 소문자로 바꿉니다. | |
[1] "test test" | |
> toupper(test) ## 대문자로 바꿉니다. | |
[1] "TEST TEST" |