0% found this document useful (0 votes)
32 views4 pages

List of Programs To Be Included in R Programming Lab File

The document lists 55 questions to be included in an R programming lab file. The questions cover a wide range of topics including matrix operations, data types, statistical functions, conditionals, loops, user-defined functions, importing/exporting data, and creating different types of charts. The questions involve writing programs in R to perform calculations, test conditions, import/export data, and display outputs like series, tables, and graphs.

Uploaded by

kakaliguha00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views4 pages

List of Programs To Be Included in R Programming Lab File

The document lists 55 questions to be included in an R programming lab file. The questions cover a wide range of topics including matrix operations, data types, statistical functions, conditionals, loops, user-defined functions, importing/exporting data, and creating different types of charts. The questions involve writing programs in R to perform calculations, test conditions, import/export data, and display outputs like series, tables, and graphs.

Uploaded by

kakaliguha00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

LIST OF PROGRAMS TO BE INCLUDED IN R PROGRAMMING LAB FILE

Q1:- Write a program in R to ADD and Multiply two matrix.


Q2:- What is a Vector, Factor List and Data frame in R .Explain with help of an example
Q3:- Describe various data type in R .Create a Data Frame Student with vector, Stuid, name,
RollNo, Address, Date of Birth.
Q4:- Write a program in R to calculate factorial of a number
Q5:- Write a program in R to display Fibonacci series.
Q6:- Write a program in R to calculate, mean, median, mode, standard deviation and
Variance.
Q7:- Write a program in R to display all even number between 1 to 100 and calculate their
sum.
Q8:- Write a program in R to display multiplication table from 1 to 20.
Q9:- Write a program in R to check a number is prime or not?
Q10:- Write a program in R to check a number is a Armstrong number or not?
Q11:- Write a program in R to Calculate Simple interest
Q12:- Write a program in R to convert temperature from Celsius to Fahrenheit and vice versa
Q13:- Write a program in R to convert days in two months week ,hours ,minutes and seconds
Q14:- Write a program in R to calculate mean for a vector Q<-C(22,3,5,6,7,8,8,99,999,11)
Q15:- Write a program in R to calculate mode for a vector Q<-C(22,3,5,6,7,8,8,99,999,11)
Q16:- Write a program in R to calculate median for a vector Q<-C(22,3,5,6,7,8,8,99,999,11)
Q17:- Write a program in R to calculate Standard deviation for a vector Q<-
C(22,3,5,6,7,8,8,99,999,11)
Q18:- Write a program in R to calculate variance mode for a vector Q<-
C(22,3,5,6,7,8,8,99,999,11)
Q19:- Write a program in R to calculate covariance for a vector Q<-
C(22,3,5,6,7,8,8,99,999,11) AND P<-c(5,6,7,8,9,11,23,44,55,6)
Q20:- Write a program in R to calculate correlation for a vector Q<-
C(22,3,5,6,7,8,8,99,999,11) AND P<-c(5,6,7,8,9,11,23,44,55,6)
Q21:- Write a program in R to check a number is even or odd?
Q22:- Write a program in R to calculate largest of three numbers?
Q23:- Write a program in R to check a number is positive, negative or zero?
Q24:- Write a program in R to check a number is Krishnamurthy’s number or not?
Q25:- Write a program in R to display transpose of a matrix
Q26:- Write a program in R to display a diagonal matrix of order 5x5
Q27:- Write a program in R to calculate linear regression between age and income of 10
employee in an organization
age<-c(22,34,55,38,41) and income<-c(2222,5555,7778,8888,9999)
Q28:-Write a program in R using a recursive function to calculate Fibonacci series
Q29:-Write a program in R to create a Data frame having record of five student as student ID,
name, and grade and contact no
Q30:- Write a program in R to display reverse of a number
Q31:- Write a program in R to swap the value of two number a and b.
Q32:- Write a program in R to sum of the digits of a number
Q33:- Write a program in R to calculate sum of the n natural numbers 1+2+3+4+-----+n
Q34:- Write a program in R to display square of first n natural numbers
Q35:-Write a program in R to check whether the roots of quadratic equation are real, equal or
imaginary?
Q36:-Write a program in R to calculate LCM of two number
Q37:-Write a program in R to calculate GCD of two inputs
Q38:-Write a program in R to check weather a candidate is eligible to vote or Not?
Q39:-Write a program in R to check a number is a perfect square or not?
Q40:- Write a Program in R to display the pattern
1
23
456
7 8 9 10
Q41:- Write a Program in R to display the pattern
1
12
123
12 34

Q42:-Write a program in R to display a bar chart for age<-c(22,34,55,38,41) and income<-


c(2222,5555,7778,8888,9999)
Q43:-Write a program in R to display a histogram for age<-c(22,34,55,38,41) and income<-
c(2222,5555,7778,8888,9999)q4
Q44:-Write a program in R to display a scatter chart forage<-c(22,34,55,38,41) and income<-
c(2222,5555,7778,8888,9999)
Q45:- Write a program in R to display a Pie chart for the data
age<-c(22,34,55,38,41) and income<-c(2222,5555,7778,8888,9999)

Q46:- WRITE A PROGRAM IN R TO CALCULATE GRADE OF A STUDENT


IF THE INPUTS IS MARKS IN THREE SUBJECT CALCULATE TOTAL AND
AVERAGE MARKS
IF AVG>90 GRADE IS A
IF AVG>80 AND AVG<=90 B
IF AVG>70 AND AVG<=60 C
IF AVG>60 AND AVG<=50 D
ELSE GRADE=FAIL

Q47:-Write a program in R to import a CSV file student having records of 10 students such
as studid, name, contact no, grade

Q48:-
26. WRITE A PROGRAM IN R TO DISPLAY ELECTRICITY BILL

IF UNIT CONSUMED IS BETWEEN 100-200 RATE PER UNIT IS 1/-

IF UNIT CONSUMED IS BETWEEN 100-200 RATE PER UNIT IS 2/-

IF UNIT CONSUMED IS BETWEEN 100-200 RATE PER UNIT IS 3/-

IF UNIT CONSUMED IS BETWEEN 100-200 RATE PER UNIT IS 4/-

ELSE 5/-
Q49:-Write a program in R to display a line chart between age<-c(22,34,55,38,41) and
income<-c(2222,5555,7778,8888,9999)

Q50:- Write a user defined function in R to check a number is armstrong number or not?

Q51:-Write a user defined function in R to check a number is Prime or not?

Q52:-Write a user defined function in R to check largest of three number

Q53:- Write a user defined function in R to add,subtract,multiply and divide two numbers
.two argument are passed to the function

Q54:- Write a user defined function to convert a number to its reverse.

Q55:- Write a user defined function display square and cube of the number entered.

You might also like