# 패키지 설치
install.packages('svDialogs')
library(svDialogs)

# 문자열 입력받기
user.input <- dlgInput('Input income')$res
user.input

# 입력받은 문자열을 숫자로 변환
income <- as.numeric(user.input)
income

# 세금 계산하기
tax <- income * 0.05
cat('세금: ', tax)

 

+ Recent posts