R Language Basic Quiz 23

The post is about the “R Language Basic Quiz” which will help you check your ability to execute some basic or R Language, RStudio, Jupyter Notebook, and Google Colab. This quiz will help the learner to understand some basic concepts related to R Programming Language. This quiz may also improve your computational understanding, and it will also help you to learn and practice the R language Basic Quiz now.

R Language Basic Quiz with Answers

R Language Basic Quiz with Answers

1. Which of the following is NOT a task facilitated by R?

 
 
 
 

2. Which among the following is a cloud-based Jupyter notebook that can be saved on Google Drive?

 
 
 
 

3. With data binning, observations are often organized into defined intervals called quartiles. Which quartile is the median of the dataset?

 
 
 
 

4. Jupyter Notebooks is the tool most R developers use.

 
 

5. What is a great alternative to Jupyter Notebooks when programming in R?

 
 
 
 

6. Which R library will you use for data visualizations such as histograms, bar charts, and scatterplots?

 
 
 
 

7. Which of the following is a lightweight tool built from Jupyterlab components?

 
 
 
 

8. Which function replaces missing values in a dataset?

 
 
 
 

9. Which of the following is True about R language?

 
 
 
 

10. What type of environment is RStudio?

 
 
 
 

11. Which of the following statements about Jupyter Notebook is correct?

 
 
 
 

12. Which is the command used to install packages in R?

 
 
 
 

13. What does “CRAN” stand for in the context of R programming?

 
 
 
 

14. Where can you type R commands in RStudio?

 
 
 
 

15. In a box plot, in which quartile does 50% of the sorted data fall below?

 
 
 
 

R Language Basic Quiz

  • Where can you type R commands in RStudio?
  • Which R library will you use for data visualizations such as histograms, bar charts, and scatterplots?
  • Which is the command used to install packages in R?
  • Which of the following is True about R language?
  • What is a great alternative to Jupyter Notebooks when programming in R?
  • Jupyter Notebooks is the tool most R developers use.
  • What type of environment is RStudio?
  • In a box plot, in which quartile does 50% of the sorted data fall below?
  • What does “CRAN” stand for in the context of R programming?
  • With data binning, observations are often organized into defined intervals called quartiles. Which quartile is the median of the dataset?
  • Which function replaces missing values in a dataset?
  • Which of the following is NOT a task facilitated by R?
  • Which of the following statements about Jupyter Notebook is correct?
  • Which of the following is a lightweight tool built from Jupyterlab components?
  • Which among the following is a cloud-based Jupyter notebook that can be saved on Google Drive?

Statistics Software and Data Analysis

R Language and Relational Databases Quiz 22

The post is about R Language and Relational Databases Management System Quiz with Answers. There are 20 multiple-choice questions about R language and database connectivity with R. Let us start with the R Language and Relational Databases Management System Quiz now.

Please go to R Language and Relational Databases Quiz 22 to view the test

R Language and Relational Databases Quiz

  • Which R function loads multiple R data structures from a *.Rda file?
  • Which of the following R variables holds the platform numeric limits for your R environment?
  • What is the role of the ODBC Driver Manager in the context of database connectivity? https://rfaqs.com
  • Suppose you are preparing to analyze sales data and have much information in an Excel spreadsheet. You have decided to convert the Excel spreadsheet to a relational database. What is your first step?
  • Which of the following correctly describes the condition for the referential constraint to occur?
  • Why is the SQL LOAD command recommended over the IMPORT command for large amounts of data?
  • What are two reasons to map an existing data source, like pre-existing database tables, database dump files, or raw data, to a relational database design?
  • Suppose, There are two tables in your database design: Customers, which lists all your customers, and Orders, which lists all the sales transactions that your customers have made over the years. Both the tables have a field called Customer_ID. Which of the following describes the relationship between the two tables?
  • What is the SQL DDL command that can be used to add primary keys to an existing table in a database?
  • What is the recommended SQL command for loading small to medium amounts of data into a database?
  • What are two ways to limit database movement and increase performance when querying a database?
  • What type of relationship does the database model indicate between each school board and multiple schools?
  • Which method is recommended to avoid unnecessary data transfer when analyzing data with a powerful database engine?
  • Which statement best describes data definition language (DDL) operations?
  • Which of the following is the correct general syntax for the INSERT statement?
  • Which statement best describes what a factor is in R?
  • Which SQL statement is used to delete records from a table?
  • Which of the following displays the correct general syntax for the SELECT statement that also includes a predicate?
  • What is a primary key?
  • Which of the following is classified as a data manipulation language (DML) statement?
R Language and Relational Databases Quiz with Answers

Online MCQs about Compute

Vectors in R Programming Language

The post is about another data structure called Vectors in R Programming. It is in the form of questions and answers with examples. Here we will discuss some important vector functions, recycling of elements, and different types of vectors with examples.

What are Vectors in R Programming?

Vectors in R Programming are basic data structures. It comes in two parts: atomic vectors and lists (recursive vectors). A vector in R language is a fundamental data structure that stores a collection of elements, all of the same data type (like numbers, characters, or logical values). Vectors in R Programming are essentially one-dimensional arrays.

How many types of vectors are in R?

The primary types of vectors in R Programming are

  • Logical Vectors (stores TRUE or FALSE values)
  • Integer Vectors (Stores Whole numbers, i.e., integers only)
  • Double (Numeric) Vectors (Stores decimal numbers)
  • Character Vectors (Stores text strings)

The less common types of vectors are:

  • Complex Vectors
  • Raw Vectors.

How to Create Vectors in R Programming Language?

To create vectors in R Programming Language, the following are few ways:

  • Create a vector using integers, use the colon (:) operator. For Example, typing 2:6 results in a vector with numbers from 2 to 6, and typing 3:-4 creates a vector with the numbers 3 to -4.
  • Create a vector using the seq() Function, Write a command such as seq(from = 4.5, to = 3.0, by = -0.5) to create a vector of numbers from 4.5 to 3.0 by decrementing 0.5 step, that is, 4.5 4.0 3.5 3.0.
  • The seq() function may also be used by specifying the length of the sequence by using the argument out, e.g., seq(from = -2.7, to = 1.3, length.out = 9). It will result in -2.7 -2.2 -1.7 -1.2 -0.7 -0.2 0.3 0.8 1.3.

What are Logical Vectors in R Programming?

In R language, a logical vector contains elements having the values TRUE, FALSE, and NA. Like numerical vectors, R allows the manipulation of logical quantities.

What are Vector Functions?

In R language, some functions are used to perform some computation or operation on vector objects, for example, rep(), seq(), all(), any(), and c(), etc. However, the most common functions that are used in different vector operations are rep(), seq(), and c() functions.

How One Can Repeat Vectors in R?

One can use the rep() function to repeat the vectors. For example, to repeat a vector: c(0, 0, 7), three times, one can use rep(c(0, 0, 7), times = 3).

To repeat a vector several times, each argument can be used, for example, rep(c(2, 4, 2), each = 2).

To repeat each element, and how often it has to repeat, one can use the code, rep(c(0, 0, 7), times = 5)

The length.out argument can be used to repeat the vector until it reaches that length, even if the last repetition is incomplete. For example, rep(1:3, length.out = 9).

rep(c(0, 0, 7), times = 3)

rep(c(2, 4, 2), each = 2)
rep(c(0, 0, 7), times = 5)
rep(1:3, length.out = 9)
Vectors in R Programming Language

What is the Recycling of Elements in R Vectors?

When two vectors of different lengths are involved in an operation then the elements of the shorter vector are reused to complete the operation. This is called the recycling of elements in R vectors. For example,

v1 <- c(4, 1, 0, 6)
v2 <- c(2, 4)
v1 * v2

## Output
8, 4, 0, 24

In the above example, the elements 2 and 4 are repeated.

What do copy-on-change Issues in R?

It is an important feature of R that makes it safer to work with data. Let us create a numeric vector x1 and assign the values of x1 to x2.

x1 <- c(1, 2, 3, 4)
x2 <- x1

Now x1 and x2 vectors have exactly the same values. If one modifies the element(s) in one of the two vectors, the question is do both vectors change?

x1[1] <- 0
x1
## Output
0 2 3 4

x2

## Output
1 2 3 4

The output shows that when x1 is changed, the vector x2 will remain unchanged. It means that the assignment automatically copies the values and makes the new variable point to the copy of the data instead of the original data.

Basic Computer MCQs