Created
July 7, 2016 10:03
-
-
Save dialektike/eae1c9ba77a1d642acaa85435bc98c65 to your computer and use it in GitHub Desktop.
미국 연비(MPG)를 한국 연비로 바꾸기
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
mpg <- seq(10,40) | |
kmL <- (mpg * 1.609344)/3.785411784 ## 단순하게 바꾸기 | |
install.packages("datamart") ## 패키지 설치 | |
library(datamart) ## 패키지 설치 | |
uconv(1, "US gal", "l", uset="Volume") ## 1 캘런을 리터로 | |
uconv(1, "mile", "km", uset="Length") ## 1 마일을 킬로미터로 | |
kmL.uconv <- uconv(mpg, "mile", "km", uset="Length")/uconv(1, "US gal", "l", uset="Volume") ## uconv()을 이용하여 바꾸기 | |
kmL == kmL.uconv ## 두 계산 결과 확인 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment