0
How to print maximum and minimum number when you assign number in Rstudio?
Hi there! How actually print out the maximum and minimum output when you have assigned the numbers in a,b and c by using Rstudio? Thanks! đ
1 Answer
0
There are the built-in functions min() and max() (you can also take a look at the summary()) and put that explicitly in a print fuction
a <- 1; b <- 2; c <- 3
allMyNums <- c(a, b, c)
print(min(allMyNums))
When you want to compare multiple variables it can be useful to put them in a common vector or something like that.