0% found this document useful (0 votes)
48 views

Answers Basics of R

This document provides a brief overview of basic R commands and functions. It includes 10 multiple choice questions about assigning values, repeating strings, combining strings, vector operations, matrix creation and dimensions, viewing imported files and more. For each question there are 4 possible answer choices labeled a, b, c, or d and the correct answer is indicated. This covers common tasks for getting started with R like data structures, arithmetic operations and basic programming.

Uploaded by

sree vyshnavi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Answers Basics of R

This document provides a brief overview of basic R commands and functions. It includes 10 multiple choice questions about assigning values, repeating strings, combining strings, vector operations, matrix creation and dimensions, viewing imported files and more. For each question there are 4 possible answer choices labeled a, b, c, or d and the correct answer is indicated. This covers common tasks for getting started with R like data structures, arithmetic operations and basic programming.

Uploaded by

sree vyshnavi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Basics of R

Name: Dr Parala Venkata Sree Vyshnavi

1. If you want to assign a value say 84 to x, you will type: ANS: b

a B c D
x - > 84 x < - 84 x == 84 x >> 84

2. For repeating word “Aha” 4 times, the command is: ANS: c

a B c D
repeat Reap rep Aha

3. For writing two strings say, k and m, you will write: ANS: c

a B c D
c(‘k’, ‘m’) c(‘’k’’, ‘‘m’’) c(k, m) c(‘k’ ‘m’)

4. If you type 2:4, the output will be: ANS: c

a B c D
0.5 0.50 234 0.500

5. If julia is having 3 words aha, omg, oops, you can recall omg by: ANS: a

a B c D
julia[2] julia(2) julia>[2] julia<[2]

6. Say x is having numbers 2 & 4, y is having numbers 5 & 6; product of x and y will be: ANS: a

a B c D
[1] 10 24 240 120 None of the given

7. matrix(1,2,3) will give you: ANS: d

a b C D
One row by two Two rows by three Two rows by three Two rows by three
columns having all columns having all columns having all columns having all
values as 3 values as 3 values as 2 values as 1

8. Sum of a vector, a, having values 3 NA 7 by command sum(a) will give you output: ANS: c

a b C D
10 0 NA Na

9. If you want to multiply vectors a and b, you will type: ANS: d

a b C D
a×b b×a a multiply b a*b

10. You want to view the imported file zoom. You will type: ANS: a

a b C D
View(zoom) view(zoom) zoom Zoom

You might also like