Skip to content

Instantly share code, notes, and snippets.

@lovetoken

lovetoken/chunk2.r

Created Feb 16, 2016
Embed
What would you like to do?
myfun1 <- function(input){
# 함수 실행 조건
stopifnot(input %>% is.numeric)
stopifnot(attributes(input)$div %>% is.numeric)
# 함수 본문
div <- attributes(input)$div
return(sum(input)/div)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment