0% found this document useful (0 votes)
29 views11 pages

Midterm Session II #0000000224 - On March 25, 2016 14 13: Processing

The document provides the results of a midterm exam, where the student scored 90% overall and above the average score. It then lists multiple choice questions testing knowledge of R functions for sequences, vectors, lists, and data manipulation. The questions cover topics like creating sequences, adding vectors, naming vectors, sorting data, calculating statistics, and manipulating lists.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views11 pages

Midterm Session II #0000000224 - On March 25, 2016 14 13: Processing

The document provides the results of a midterm exam, where the student scored 90% overall and above the average score. It then lists multiple choice questions testing knowledge of R functions for sequences, vectors, lists, and data manipulation. The questions cover topics like creating sequences, adding vectors, naming vectors, sorting data, calculating statistics, and manipulating lists.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Midterm Session II #0000000224 | On March 25, 2016 14;13

Score Obtained 90 out of 100 (90.00%)

Average Score (based on 64 submissions) 71.81 out of 100 (71.81%)

Administrator Remarks Processing

StudentID 2015300219

seq(5,by=1,length.out = 5)

seq(6,10,by=1)
Which one creates a different output?
6@10

seq(to=10,from=6)

-1 9 3 -3

-1 9 3 0
Which one is the output of c(-2,6,3) + c(1,3,0,-1)
-1 9 3 -1

-1 9 3 NA

rep(-2;2,c(2,1,2,1,2))

seq(-2@2,c(2,1,2,1,2))
Which one creates the sequence -2 -2 -1 0 0 1 2 2 ?
seq(2:-2,c(2,1,2,1,2))

rep(-2@2,c(-2,-1,0,1,2))

Which one creates vectors Real.GDP and Nominal.GDP by using the table Real.GDP <- c(492,27,280,224)
above? Nominal.GDP <- c(495,32,291,251)

Real.GDP <- (492,27,280,224)


Real GDP Nominal GDP Nominal.GDP <- (495,32,291,251)

Real.GDP <- list(492,27,280,224)


Japan 492 495 Nominal.GDP <- list(495,32,291,251)

Egypt 27 32

France 280 291 Real.GDP <- c[492,27,280,224]


Nominal.GDP <- c[495,32,291,251]
Brazil 224 251

names(Real.GDP) <-
c("Japan","Egypt","France","Brazil")
names(Nominal.GDP) <-
c("Japan","Egypt","France","Brazil")

names(Real.GDP) <-
c(Japan,Egypt,France,Brazil)
names(Nominal.GDP) <-
c(Japan,Egypt,France,Brazil)
Which one gives names (Japan, Egypt, France, Brazil) to the vectors Real.GDP
and Nominal.GDP? name(Real.GDP) <-
c("Japan","Egypt","France","Brazil")
name(Nominal.GDP) <-
c("Japan","Egypt","France","Brazil")

names(Real.GDP) <-
("Japan","Egypt","France","Brazil")
names(Nominal.GDP) <-
("Japan","Egypt","France","Brazil")

Real.GDP[order(Nominal.GDP)]

Nominal.GDP[sort(Real.GDP)]
Which of the following sorts Real.GDP according to the Nominal.GDP?
Nominal.GDP(order[Real.GDP])

Real.GDP(sort[Nominal.GDP])

GDP.Deflator <- (Nominal.GDP /


Real.GDP)*100
According to this definition, which of the following gives the GDP deflator
vector of countries Japan, Egypt, France and Brazil? GDP.Deflator <- (Nominal.GDP /
Real.GDP)x100
GDP deflator is calculated as “(Nominal GDP / Real GDP) x 100”.
GDP.Deflator <- Real.GDP / Nominal.GDP*100

GDP.Deflator <- Nominal.GDP / Real.GDPx100

round(GDP.Deflator,2)

signif(GDP.Deflator,2)
Which of the following includes numbers which have exactly 2 decimal places
for the GDP.Deflator? trunc(GDP.Deflator,2)

floor(GDP.Deflator)

ifelse(GDP.Deflator<110,"Low
Inflation","High Inflation")

min(GDP.Deflator,2)
Which of the following creates GDP deflator groups "Low inflation" and "High
inflation"? ifelse(sort(GDP.Deflator,2),"Low
Inflation","High Inflation")

GDP.Deflator[GDP.Deflator<110] <- "Low


Inflation"

names(GDP.Deflator[GDP.Deflator<110])

names(GDP.Deflator[GDP.Deflator>110])
Which one gives the names of the countries whose GDP deflator is less than
110? names(sort(GDP.Deflator<110))

names(ifelse(GDP.Deflator<110,names))

Which of the followings are TRUE for lists? ii,iii

i,ii
i.Lists can contain only one data type.
ii.Double brackets are one of the ways to reach elements of the list. i,ii,iii
iii.To concatenate lists, vector notation is used.
ii

>Student$Department<-NULL
>Student<-
c(Student[c(1,2)],Id=...,Student[c(4;5)])
Which of the following is the code that deletes the "Department" component
from list and adds "ID" as the third element of the list? >Del(Student$Department)
>Student[[3]]<-c(ID=...)
We have a list called “Student” whose elements are “Name”, “Age”,
>Student[["Department"]]<-NULL
“Department”and “GPA” in order. >Student$ID<-c(...)

>Del(Student$Department)
>Student<-
c(Student[c(1,2)],Id=...,Student[c(4@5)])

Which code do we need to use? lapply(Grades,sd)

apply(Grades,var)
We have a list that contains the grades of students, named Grades. Each
element of the list corresponds to different courses. We want to learn the sapply(Grades,sd)
standard deviation of grades for every course in a list format.
lapply(Grades,var)

Instead of rbind in data frames, we can


also use the $ notation.

ifelse is used for data filtering in data frames


Which of the following is NOT true? as well.

[-2,] deletes the second row in the data


frame.

[[1]] and [,1] basically returns the same thing.

A data frame called student is formed. A


new component of the data frame, Cem, is
added as a row. All the rows that
correspond to the students whose GPAs
are less than or equal to 3.5 are obtained.

A data frame called student is formed. A new


What does this code perform? component of the data frame, Cem, is added
as a column. Only the columns that
We have the following code: correspond to the students whose GPAs are
less than or equal to 3.5 are obtained.
>student<-data.frame(ID=student.ID,dept=student.dept,GPA=student.GPA)
A data frame called student is formed. A new
>student<-rbind(student,Cem=list(12,”EC”,3.25)) component of the data frame, Cem, is added
>student[student$GPA<=3.5,] as a column. All the rows that correspond to
the students whose GPAs are less than or
equal to 3.5 are obtained.

A data frame called student is formed. A new


component of the data frame, Cem, is added
as a row. Only the GPA column that
corresponds to the students whose GPAs are
less than or equal to 3.5 is obtained.

Given the matrix named Grades, which of the following code scripts does NOT Grades <- c(50,100,45) + c(90,100,70)+
generate Grades matrix? c(75,85,60)

Grades <-
Grades matrix is defined as follows: matrix(c(50,90,75,100,100,85,45,70,60),3,3)

rbind(c(50,100,45), c(90,100,70), c(75,85,60))

50 100 45

90 100 70
matrix(c(50,90,75,100,100,85,45,70,60),3)

75 85 60

Given the matrix named Cars, which of the following code scripts returns the Cars["HONDA", "2nd Hand"]
2nd Hand price of HONDA ?
Cars[2,3]
Cars matrix is defined as follows: Cars [3[2]]

Original Second Hand

BMW 75000 16000

Cars [c(3,2)]
FIAT 32000 50000
HONDA 40000 25000

Given the matrix named Employees, what will be the output when 1234
"sort(order(Employee[,3]))" is executed ?
2413

1500 7500 3800 3000


EmployeeID Age Salary

Funda 20110012 34 7500

Ege 20110024 25 3000

3000 3800 7500 11500

Kaya 20110000 55 11500

Cenk 20111212 23 3800

Employee <-
cbind(Employee[,1;2],Employee[,3]*1.2)

Considering the same Employee matrix, let's say the headmaster decided to Employee <- Employee+Employee*20/100
increase all salaries by 20 percent. Which of the following code scripts update Employee <-
the Employee matrix correctly according to this new decision? cbind(Employee[c(1,2),],Employee[3,]*1.2)

Employee <-
apply(Employee,Employee[,3]*1.2)

Which of the following code scripts can be used in order to add this new Employee <- rbind(Employee,"Harun" =
person in the Employee matrix? c(20111912,22,3600))

Employee <-Employee +
Considering the same Employee matrix without any updates, assume the c("Harun",20111912,22,3600)
company hired a new person with the following informations :
Employee<-rbind("Harun" =
Name : Harun c(20111912,22,3600))
EmployeeID : 20111912
Age : 22 Employee<-Employee + rbind("Harun" =
Salary : 3600 c(20111912,22,3600))

Which of the following codes can NOT be used if you want to add a fourth person[4,] <- person[2,] / person[3,]^2
column of BMI?
person[[4]] <- person[[2]] / person[[3]]^2
Suppose you construct the following data frame: person$bmi <- person$weight /
person$height^2
person <- data.frame(name = c(“Guliz”,”Cansu”,”Sevil”), weight = c(80,65,68),
height = c(1.8,1.7,1.65))
person[,4] <- person[,2] / person[,3]^2

Which of the operations should be enough to realize your aim? Merge the two data frames by name and
team.
You have the following data frames:
Assign a set of ID's to each data frame, then
frame1: merge by ID.

Name Team City Bind the two data frames together by cbind.
1 Su FB Bursa
2 Berk FB Izmir
3 Cem GS Ankara
4 Tan FB Ankara
5 Su BJK Bursa
6 Naz GS Adana

frame2:

Name Team Age


1 Su FB 16
2 Naz GS 28 Merge the two data frames by name only.
3 Can BJK 20
4 Tan FB 21

You assume that there cannot be two or more people of the same name and
team.

You want to have a new data frame with the people that are present only in
both of the data frames. You want to store all information related to a single
person in a row.

After making sure that the text file is located in your working directory, which read.table("abc.txt", header = T, sep = "-")
of the following codes should you run?
read(abc.txt, header=F, sep = "")
Your friend sends you a set of data as a text file (named abc.txt) for a project table("abc.txt", sep = ",")
you two are working on.

Here is how the set of data begins:

Model-Set-Solution
Linear-Convex-Yes
Nonlinear-Convex-No
Integer-Not Convex-No read.table(header = T, abc.txt, sep = "-")
…..

You would normally create a new data frame with this information by typing
yourself. However, you see that the list goes on and on and you do not have
enough time.

Creates a data frame named t1. Adds a


fourth column which gives the BMI
category for each person. Creates another
data frame with the initial information in
increasing age order.
What does the following code do?
Creates a data frame named t1. Rearranges
t1 <- data.frame(Name = c(“Mert”,”Ahmet”,”Deniz”), BMI = c(17,26,23), Age = the places of rows in increasing age order.
c(21,24,30)) Does not change the data frame's structure
further, but outputs the categories for each
t2 <- t1[order(t1$Age),] person.

Creates a data frame named t1. Rearranges


t1$Category <- ifelse(t1$BMI<18.5, “Underweight” ,(ifelse(t1$BMI>25, the places of rows in increasing age order.
“Overweight”, “Normal Range”))) Adds a fourth column which gives the BMI
category for each person.

Creates a data frame named t1. Adds a fourth


column which gives the BMI category for each
person. Sorts the final table in increasing
order.

What is X? Data frame

High-dimensional array
We should be careful about the arguments of the binding functions “rbind”
and “cbind” when we try to apply them to an X, because their arguments may Matrix
not always be of the same data structure.
None of the above.

Which one of the commands below should be run to access the population ankara[['population']]
component of the list? ankara$(population)

The following command is executed: ankara[population]

ankara <- list ( name = ‘Ankaraʼ , population =5270575 , capital = TRUE )


ankara$2

Which one of the commands below should have been executed in order to get ankara <- list("Ankara", 5270575, c(25,
such an output? 1430), FALSE, c("Cankaya","Besevler"))

ankara <- list("Ankara", 5270575, 25, 1430,


The following command is executed and the output below is observed: FALSE, "Cankaya", "Besevler")

> ankara ankara <- list(name = "Ankara", population =


5270575, district_neighbourhood = c(25,
[[1]] 1430), capital = FALSE, district =
c("Cankaya","Besevler"))
[1] “Ankara”
[[2]]
[1] 5270575
[[3]]
[1] 25 1430 ankara <- list(1 = "Ankara", 2 = 5270575, 3 =
[[4]] c(25, 1430), 4 = FALSE, 5 =
[1] TRUE c("Cankaya","Besevler"))
[[5]]
[1] “Cankaya” “Besevler”

Which one of the commands below should have been executed in order to get lapply(A, mean)
such an output?
sapply(A, mean)
The following command is executed: mean(A)

A <- list(c(7, 13, 17, 10, 3), c(9, 5, 8, 1, 6), c(14, 4, 20, 15, 16), c(2, 18, 11, 12,
19))

After another command is executed, such an output is given by R:

[[1]]
[1] 10
[[2]] lmean(A)
[1] 5.8
[[3]]
[1] 13.8
[[4]]
[1] 12.4

Which one of the commands below should have been executed in order to get sapply(A, mean)
such an output?
lapply(A, mean)
The following command is executed: mean(A)

A <- list(c(7, 13, 17, 10, 3), c(9, 5, 8, 1, 6), c(14, 4, 20, 15, 16), c(2, 18, 11, 12,
19))

After another command is executed, such an output is given by R: smean(A)

[1] 10.0 5.8 13.8 12.4

Which one of the followings contains all the elements of the resulting data {a,b,c,g,h,i,j,k,1,2,3}
structure?
{a,b,c,d,e,f,g,h,i,j,k}
The following commands are executed: {j,k}

B <- list(c(“a”,”b”,”c”),c(1,2,3))
B <- list(B,c(“d”,”e”,”f”),c(“g”,”h”,”i”))
B[[2]]<-NULL
{a,b,c,j,k,1,2,3}
B[[3]]<-c(“j”,”k”)

Which of the following are not correct for data frames? iii

i,iii
i. Data frame is also a list.
ii. We can have numbers in one coloumn and character strings in another ii,iii
column of a data frame.
iii. Data frames do not have two dimensional rows and coloumns structure. i,ii,iii

In order to obtain "person_info" data frame which of the following can be i,ii
used?
i
person_info is defined as follows: ii
height weight initial
1 1.70 70 C
2 1.75 75 C
3 1.60 60 C

i. person_info <- data.frame(height=c(1.70,1.75,1.60), None of them


weight=c(70,75,60),initial=”C”)
ii. person_info <- data.frame(height=c(1.70,1.75,1.60),
weight=c(70,75,60),initial=c(“C”,”C”,”C”)

Which of the following CANNOT be used to obtain the departments of All of them can be used
students?
students$Department
students is defined as follows: students[,1]

Department Year Repeat


Can IE 2 TRUE
Cem EC 1 FALSE students [["Department"]]
Hande EE 4 FALSE

Which of the following are true about this code? iii

ii
We have a text file in our directory which is “students_info”. This file contains
the following: i,iii

Department Year Repeat


Can IE 2 TRUE
Cem EC 1 FALSE
Hande EE 4 FALSE

In order to import this file we


use read.table(“students_info.txt”,header=TRUE,sep=” “) i,ii

Which of the following are true about this code?

i. header=TRUE is unnecessary as default value of header is already TRUE.


ii. Given code is wrong, sep must be equal to “,”.
iii. Given code is correct.

Which of the following binds these two data frames as below? merge(employees,employees_info,by="ID")

We have two data frames which are “employees” and “employees_info”.


cbind(employees,employees_info,by="ID")
employees:
cbind(employees,employees_info)
ID Name Salary Staff
1 Joe 55000 Yes
2 Jim 51000 Yes
3 Jean 45000 No
employees_info:

ID Height Weight
1 1.7 69
2 1.85 75 data.frame(employees,employees_info)
3 1.75 77

Which of the following binds these two data frames as below?

ID Name Salary Staff Height Weight


1 Joe 55000 Yes 1.7 69
2 Jim 51000 Yes 1.85 75
3 Jean 45000 No 1.75 77

Which one of the commands below removes the vector (10,11,12) from the list? list3<-list3[[2]][-2]

list3<-list3[[3]][-2]
The following commands are executed:
list3<-list3[-4]
list1<-list(c(1,2,3),c(4,5,6))
list2<-list(c(7,8,9),c(10,11,12))
list3<-list(list1,list2) list3<-list3[[2]][[1]][-2]

What is the result of length(list3)? 2

1
The following commands are executed:
3
list1<-list(c(1,2,3),c(4,5,6))
list2<-list(c(7,8,9))
list3<-list(list1,list2) 4

Which command adds those 3 classes to our list? list3 <- mapply(rep,list3,2;3)

list3 <- mapply(rep,list3,1@2)


list3 contains the age of students in two different classes, namely:
list1<-list(Age=c(18,22,32,19)) list3 <- mapply(rep,list3,3@2)
list2<-list(Age=c(21,19,28,23))
list3<-list(ClassA=list1,ClassB=list2)

Suppose there is one more class with exactly same ages as of Class A and
there are two more classes with same ages as ClassB. Which command adds list3 <- mapply(rep,list3,seq(1,3,2))
those 3 classes to our list?
( mapply can be used to apply functions that require two inputs. )

Which command removes the Spouse vector from the list? person1<-person1[-3]

delete(person1$Spouse)
A list holds information about a person:
person1<- person1<-person1[[-3]]
list(Name=”Ebru”,Age=35,Spouse=”Mehmet”,Children=c(“Zeynep”,”Mehmet”))

Suppose Ebru divorces from Mehmet, which command removes the Spouse
person1[-[3]]
vector from the list?

sum(sapply(listr,sum))/6
Which command finds the grand average of all numbers?
sum(lapply(listr,sum))/6
A list is formed as follows:
listr<-list(c(3,5,7),c(2,4,6)) mean(lapply(listr,mean))

sapply(listr,mean)

34
What is the value of x?
3
y <- c(3,4,5)
x <- y[y<5] 345

4
Which of the following codes would help her to do her homework? apply(M,2,mean)

A student has a homework in which she needs to calculate mean(average) of apply(M,2,sd)


10 vectors. She has the vectors in a matrix form (shown as M below) i.e each
apply(M,2,var)
column of the matrix is a vector. Which of the following codes would help her
to do her homework?

M
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
apply(M,1,var)
[1,] 1 4 6 10 13 16 19 72 25 28
[2,] 2 4 8 11 50 17 20 98 20
[3,] 3 5 9 12 15 6 21 24 27 30

Which of the following code would give her the countries that has the LOWEST sort(GDP/Population,decreasing=FALSE)
GDP per capita? [1]

sort(GDP/Population,decreasing=TRUE)[1]
A student has a homework which she needs to find country with lowest GDP
per capita. She has two vectors “Population” and “GDP” which includes 5 sort(GDP/Population,decreasing=FALSE)[5]
countries each. Which of the following code would give her the countries that
has the LOWEST GDP per capita? (GDP per capita can be found by dividing
GDP by Population.)

Population <- c(USA=320, Japan=126, Turkey=80, Netherlands=17,


sort(GDP)[1]
Sweden=9.5)
GDP <- c(USA=17000, Japan=4600, Turkey=799, Netherlands=870,
Sweden=570)

Which of the following would give the second and third rows of the matrix z? z[c(2,3),]

z[,c(2,3)]
Matrix “z” is defined as follows:
[,1] [,2] [,3] z[;2,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9 z[2,3]

What is the value of x? 9

15
Binary matrix is defined as follows:
[,1] [,2] [,3] [,4] 8
[1,] 1 1 1 1
[2,] 1 0 0 1
[3,] 1 0 0 1
[4,] 1 1 1 1

A student has a matrix called “Binary” as above,in which every row resembles 16
a number. The student writes a code in order to convert 3rd row to decimal,
which is as follows:

x <- Binary[3,][1]*2^3+Binary[3,][2]*2^2+Binary[3,][3]*2^1+Binary[3,][4]*2^0

Which of the below gives the correct function creation and monthly cost cost.function <-function(x,y,z,t) { x*
matrix for the firms? (1000*y + z) + t }
cost.matrix <- cost.function(trucks,
M1 M2 M3 M4 M5 M6 costs[,1],costs[,3],costs[,2])
M7 M8 M9 M10 M11 M12
A 56 59 66 65 61 74 cost.function<-function(x,y,z,t) { x*(1000*y +
82 82 68 55 52 59 z) + t }
cost.matrix <- function(trucks,Fuel Cost per
B 36 47 45 51 57 57
KM,Maintenance Cost per Thousand KM,Fixed
61 57 53 55 50 48 Cost)
C 70 64 66 72 58 55
42 44 60 78 71 54 cost.function<- cost.function(x,y,z,t) { x*
D 36 34 37 32 28 40 (1000*y + z) + t }
44 45 39 33 28 24 cost.matrix <- cost.function(trucks,
Monthly Truck Usage for 4 Different costs[1,],costs[3,],costs[2,])
Construction Companies

Fuel Cost per KM Fixed Cost


Maintenance Cost per Thousand KM
A 8 400000 2000
B 7 300000 1900
C 6 250000 1600
D 8 325000 1750
Cost Matrix for Given Firms cost.function<-x*(1000*y + z) + t
cost.matrix <- cost.function(trucks, costs[,1],
Monthly truck usage in terms of thousand kilometers and different cost costs[,3], costs[,2])
structures are given in the matrices above.
We name these matrices as trucks and costs, respectively.
Monthly costs for each company can be calculated by;
Costs <- Monthly Truck Usage*(1000*Fuel Cost per KM+Maintenance Cost
per Thousand KM)+Fixed Cost

yearly.costs <- apply(cost.matrix, 1, sum)


cost.matrix <- cbind(cost.matrix,
yearly.costs)
cost.matrix <-
cost.matrix[order(cost.matrix[,
13],decreasing=T), ]
What are the correct codes for these operations?
yearly.costs <- apply(cost.matrix, 1, sum)
cost.matrix <- cbind(cost.matrix, yearly.costs)
Suppose that we want to calculate yearly costs for each company and sort
cost.matrix <- cost.matrix[order(cost.matrix[,
them according to the yearly costs in descending manner. 13]),]
In addition we want to make these operations inside the cost.matrix that is
yearly.costs <- apply(cost.matrix, 2, sum)
calculated above.
cost.matrix <- cbind(cost.matrix, yearly.costs)
cost.matrix <- cost.matrix[order(cost.matrix[,
13],decreasing=T), ]

yearly.costs <- apply(cost.matrix, 2, sum)


cost.matrix <- cbind(cost.matrix, yearly.costs)
cost.matrix <- cost.matrix[order(cost.matrix[,
13]),]

election2016 <- election2016 *


t(election2016)
election2016[,3] <- -1*election2016[,3]
What is the codes that Sanders should use during the calculations?
election2016 <- election2016 %*%
One of Bernieʼs friends, Sanders, asks him to do a favor: t(election2016)
“Hey Bernie, I have a 3×3 matrix, letʼs call it election2016. I want to take its election2016[3,] <- -1*election2016[3,]
transpose, then multiply this transpose element by element with election2016 <- election2016 %*%
election2016. Then I am going to multiply the last column of this new matrix by t(election2016)
-1. If you can do that in R for me, I owe you big time.” election2016[,3] <- -1*election2016[,3]

election2016 <- election2016 *


t(election2016)
election2016[3,] <- election2016[,-3]

In order to update their new scores in the scores matrix, which of the following scores[c(1,3,4),"TOEFL"] <- c(110,114,112)
codes is correct? scores[“Aziz","Proficiency"] <- “A”

scores matrix is defined as follows: scores[c(1,3,4),"TOEFL","Proficiency"] <-


c(110,114,112,A)

scores[c(“Nuri","Orhan","Aziz"),1] <-
TOEFL IELTS Proficiency c(110,114,112)
Nuri 109 8 B scores[“Aziz",3] <- A
Daron 118 8.5 A
Orhan 103 8.5 A
Aziz 105 8 C

4 studentsʼ scores are given in the matrix above. Nuri and Orhan were not
satisfied with their TOEFL scores and decided to take these exams again.

During the examinations, they ran into Aziz who was taking TOEFL and scores[c(1,3,4),c("TOEFL","Proficiency")] <-
c(110,114,112,"A")
Proficiency on the same day. A couple of weeks later their new scores
announced.
Nuri and Orhan got 110 and 114 from TOEFL respectively, Aziz got 112 from
TOEFL and A from Proficiency.

Which of the below are correct statements? ii, iii

i, ii
lost matrix is defined as follows:
i, iii

D E F
A 1 1 2
B 4 8 15
C 16 23 42

i. lost > lost[,1] statement gives a matrix whose first column elements are
i, ii, iii
FALSE, others are TRUE
ii. lost[lost <= lost[2,3]] statement yields a vector of (1,4,1,8,2,15)
iii. lost[1,] <- lost[lost<=lost[1,3]] statement does not make any changes to
lost matrix.

You might also like