Skip to content

Commit

Permalink
add R support (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
costis-t authored Feb 27, 2022
1 parent c27cd88 commit e147ffa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/costis-t.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
coffee_to_code <- function(caffeinated_string) {
decaf_message <- paste("The string does not contain",
"the right amount of caffeine,",
"change it to 'coffee'.", sep = ' ')
decaffeinated_string <- ifelse(caffeinated_string == 'coffee',
'code',
decaf_message)
return(decaffeinated_string)
}

# coffee_to_code('random_string')
# coffee_to_code('coffee')

0 comments on commit e147ffa

Please sign in to comment.