Professional Documents
Culture Documents
Data Using R
Data Using R
---------------------------------------------------------------------------------------------------------
Title: Find its length, sum and mean. Usingsequence function generate the numbers, increment by
10.
Aim:-
Assign 10 values to a variable. Find its length, sum and mean. Usingsequence function generate the
numbers, increment by 10.
PROCEDURE STEPS/ALOGRITHM:
1. Start the program or R environment.
2. Assign 10 values to a variable using the c() function and store it in a variable, such as
values.
3. Calculate the length of the variable using the length() function and store it in a
variable, such as length_value.
4. Calculate the sum of the values using the sum() function and store it in a variable,
such as sum_value.
5. Calculate the mean of the values using the mean() function and store it in a variable,
such as mean_value.
6. Generate a sequence of numbers incremented by 10 using the seq() function,
specifying the start, end, and increment values. Store the sequence in a variable, such
as sequence.
7. Display the length, sum, mean, and generated sequence using the cat() or print()
function.
8. End the program or continue with additional data analysis tasks.
PROGRAM :
RESULT/OUTPUT :
Length: 10
Sum: 275
Mean: 27.5
Sequence: 010 20 30 40 50 60 70 80 90
RESULT :
That's it! By following these steps/algorithms, you can perform data analysis on a variable in
R, find its length, sum, and mean, and generate a sequence of numbers incremented by 10.