R Programming - Put Paper - Importantquestions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

SHORT QUESTIONS

a) What is the syntax used for writing data in R?


b) Write the syntax for finding the sum, mean and product of vectors in R.
c) What will be the class of the vector if you concatenate a number and a character?
d) Write the syntax to generate the sample of 5 elements from the vector with replacement
a<-c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
e) What will be the output of the following R code?
> x <- 1:3
> y <- 10:12
> rbind (x, y)
f) Write the syntax for the “if” conditions in R.
g) Write the code in R using “For” loop for generating a sequence of integers from 1 to 10?
h) Write the R code that skips the first 20 iterations.
i) Write the R program to concatenate two strings in R using a separator” _”.
j) How to read data from other statistical tools like SPSS, SAS.

LONG QUESTIONS

1. Explain apply function and the family of apply functions in R with the help of an example

2. What are the different Data Reshaping functions in R?


3. What is Data Visualization in R? How it is beneficial for the graphical representations
in R.
4. Explain any 4 basic graphs used for representation in R.
5. What are the functions in R? Explain inline functions in R with the help of an example.
6. Write the function in R to print the Fibonacci sequence with and without recursion.
7. Explain the difference between Break and Next statements in R with the help of anexample.
8. What are the different looping statements in r
9. What are the factors in R. Write the R program to create a factor “grades” with levels
“Pass”, “Fail”, “Not Valid”.
10. How to use ggplot2 package for graph visualization?

You might also like