You are on page 1of 2

(Regulation 2020)

Q1.) R CONCEPTS (10 MARKS)

1a) Write the R code used in the installation & loading of Rattle GUI and attached snapshot
of the loaded Rattle. MAC USER

Install.packages(RGtk2)

Library(Rgtk2)

Install.packages(Rattle)

Library(Rattle)

Rattle()

1b) Describe different primitive data structures in R with their example codes in R and how
to test them.

Primitive Data Structures are vector, list, matrix, data frame


To test data Structure we can use below codes:

1c) Differentiate between Data frame & Lists data structures of R and write a code to create
data frame of length 20.

Data Frame Code – df <- data.frame(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)

1d.) Install and load “tidyverse” package in R-studio & comment on the variables of the
“starwars” dataset.

install.packages("tidyverse")
library(tidyverse)
data()
view(starwars)

You might also like