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! 😊

5th Oct 2019, 2:36 PM
Jun Jie
Jun Jie - avatar
1 Respuesta
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.
12th Oct 2019, 6:30 PM
Lisa
Lisa - avatar