Run ❯
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
fruits <- c("banana", "apple", "orange", "mango", "lemon") numbers <- c(13, 3, 5, 7, 20, 2) sort(fruits) # Sort a string sort(numbers) # Sort numbers
[1] "apple" "banana" "lemon" "mango" "orange"
[1] 2 3 5 7 13 20