Professional Documents
Culture Documents
R Assignment On 2nd Sep 2022
R Assignment On 2nd Sep 2022
Uniform Distribution
Normal Distribution
Sorting of vectors can be done using the sort() function. By default, it sorts in ascending order. To
sort in descending order we can pass decreasing=TURE.
Sometimes we would want the index of the sorted vector instead of the values. In such case we can
use the function order().
Output:
Output 2:
Output 2:
Output 2:
If a year is divisible by 4 and 100 but not divisible by 400, it's not a leap year.
Output 2:
Output 1:
Output 2:
Output:
Output:
Output:
Output:
17. Fibonacci Sequence Using Recursion in R
Output:
18. R Program to Find H.C.F.
Output:
Output: