Skip to content

Commit

Permalink
Adding double logical operators for temperature conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-friedman committed May 18, 2017
1 parent 3691851 commit 015cc05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/temperature_conversions.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ convert_temperature <- function(temperature, old_metric, new_metric,
round = 2){

possible_metrics <- c("fahrenheit", "celsius", "kelvin", "f", "c", "k")
if(!(old_metric %in% possible_metrics) |
if(!(old_metric %in% possible_metrics) ||
!(new_metric %in% possible_metrics)){
stop(paste0("The arguments `old_metric` and `new_metric` can only ",
"have one of the following values: `",
Expand Down

0 comments on commit 015cc05

Please sign in to comment.