Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech IV R PROGRAMMING Previous Question Paper (September - 2022 - R16)
Answer any five questions. All questions carry equal marks.
Main
Explain the basic features of R.
Answer
R is a powerful, open-source programming language and software environment primarily used for statistical computing, data analysis, and graphical representation. Its core features include:
- Open Source: R is free to use and distributed under the GNU General Public License, allowing users to modify and redistribute the source code.
- Statistical Capabilities: It provides a wide variety of statistical techniques, including linear and non-linear modeling, classical statistical tests, time-series analysis, and clustering.
- Data Visualization: R has excellent graphical capabilities, allowing for the creation of publication-quality plots, charts, and complex data visualizations through packages like ggplot2.
- Extensibility: The functionality of R can be extended through user-created packages, which are hosted on repositories like CRAN, Bioconductor, and GitHub.
- Object-Oriented Programming: R supports multiple object-oriented programming paradigms, allowing for complex data structures and modular code development.
- Cross-Platform Compatibility: R runs on various operating systems, including Windows, macOS, and Linux.
- Data Handling: It includes effective data storage and handling facilities, with a suite of operators for calculations on arrays and matrices.
What points to be considered in installing and run R?
Answer
When installing and setting up R, the following considerations are essential for a stable and efficient environment:
- System Requirements: Ensure the operating system (Windows, macOS, or Linux) is compatible with the latest version of R. Check for sufficient RAM and disk space, especially if working with large datasets.
- CRAN Repository: Always download the R binary from the official Comprehensive R Archive Network (CRAN) to ensure the version is authentic, secure, and up-to-date.
- RStudio Integration: While R can be run via the command line, it is highly recommended to install RStudio, an Integrated Development Environment (IDE) that provides a user-friendly interface, script editor, and workspace management.
- Environment Variables: On some systems, ensure that the R installation path is correctly added to the system's PATH variable to allow execution from the terminal.
- Package Management: After installation, understand how to manage libraries using the install.packages()andlibrary()functions. Be aware of the default library path where packages are stored.
- Permissions: Ensure you have administrative or appropriate user permissions to install software and write to the library directories, particularly when updating packages.
- Version Control: If working on multiple projects, consider using tools like 'renv' to manage project-specific package versions to avoid dependency conflicts.
What support is provided by R in handling complex numbers? Discuss suitable examples.
Answer
Sign in to view the complete answer paper.
Write a R program to check whether a given number is a prime number.
Answer
Sign in to view the complete answer paper.
Compare and contrast matrices and data frames of R.
Answer
Sign in to view the complete answer paper.
Describe scoping rules for functions in R.
Answer
Sign in to view the complete answer paper.
Illustrate the use of the following R operators in vector creation: Colon operator, sequence operator, repetition operator
Answer
Sign in to view the complete answer paper.
Write R program to find runs of consecutive ones in a vector.
Answer
Sign in to view the complete answer paper.
What is a R List? How to access and work with lists? Explain with examples.
Answer
Sign in to view the complete answer paper.
Demonstrate apply, lapply and sapply functions to list.
Answer
Sign in to view the complete answer paper.
Which matrix operations can be applied to Data frames? Explain with examples.
Answer
Sign in to view the complete answer paper.
How to merge two data frames? Give illustrations.
Answer
Sign in to view the complete answer paper.
Illustrate the application of split and by functions to factors.
Answer
Sign in to view the complete answer paper.
Consider student semester exam data in a table to compute average marks for a student and find average performance of the class in each subject.
Answer
Sign in to view the complete answer paper.
What is encapsulation? How does R support encapsulation?
Answer
Sign in to view the complete answer paper.
With suitable data and R program explain conversion of a compressed matrix to an ordinary one.
Answer
Sign in to view the complete answer paper.