R Quiz – Dataframes
This Quiz is based on the learnings of Dataframes. If you want to reference the tutorials you can visit
Basic of Dataframes
Basics of Dataframes2
Quizsummary
0 of 10 questions completed
Questions:
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
Information
This R Quiz is focused on Dataframes, which includes – Creation of dataframes, referencing dataframes, subsetting etc.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 10 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score 

Your score 

Categories
 Not categorized 0%
Pos.  Name  Entered on  Points  Result 

Table is loading  
No data available  
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 Answered
 Review

Question 1 of 10
1. Question
Consider the following code chunk
df<data.frame(v1=c(1:5),v2=c("a","b","c","d","e")) var1<nrow(df)*length(df)
What will be the value stored in var1?
Correct
nrow() on a dataframe gives the number of rows in it while length() gives number of columns.
Hence nrow(df)=5, length(df)=2 which gives
var1<5*2 i.e. 10Incorrect
nrow() on a dataframe gives the number of rows in it while length() gives number of columns.
Hence nrow(df)=5, length(df)=2 which gives
var1<5*2 i.e. 10 
Question 2 of 10
2. Question
Which of the following statement is(are) TRUE?
Correct
head() function returns the top 6 rows from raw dataset including all the columns, while tail() function returns the bottom rows
Incorrect
head() function returns the top 6 rows from raw dataset including all the columns, while tail() function returns the bottom rows

Question 3 of 10
3. Question
Which of the following is not a part of summary output?
(Assume class of all the columns is numeric)Correct
Summary function on a numeric column will result into following statistics:
Minimum, 1st Quartile, Median, Mean, 3rd Quartile, MaximumIncorrect
Summary function on a numeric column will result into following statistics:
Minimum, 1st Quartile, Median, Mean, 3rd Quartile, Maximum 
Question 4 of 10
4. Question
Consider the following piece of code:
v1<c(1:5) v2<c(6:10) df1<data.frame(v1,v2) df2<data.frame(v1=c(1:5),v2=c(6:10)) identical(df1,df2)
What will be the final output?
Correct
Both the ways of creating dataframe are same and hence they will result into similar output.
Incorrect
Both the ways of creating dataframe are same and hence they will result into similar output.

Question 5 of 10
5. Question
Consider the following dataframe “df”
Which of the following statements are TRUE?Correct
Incorrect

Question 6 of 10
6. Question
Consider the following dataframe df
What will be the output df(1,1)Correct
Dataframe objects can be referenced by square brackets [] only
Incorrect
Dataframe objects can be referenced by square brackets [] only

Question 7 of 10
7. Question
Consider df to be a dataframe.
What is the difference between df[,1] & df[1]?Correct
Incorrect

Question 8 of 10
8. Question
Which of the following is(are) TRUE?
Correct
Incorrect

Question 9 of 10
9. Question
Consider the following piece of code:
df1<data.frame(v1=c(1:10),v2=c(101:110),v3=c(rep(c("a","b"),5))) df2<df1[,2]
Which of the following statements is(are) TRUE?
Correct
Incorrect

Question 10 of 10
10. Question
Consider the following dataframe df
Sort the following in ascending order (based on the output values returned by these lines)Rearrange them using your mouse (Left key pressed)

length(class(df))

ncol(df)

nrow(df)/2

length(df$v1)
Correct
Incorrect

analyticsfreak
Latest posts by analyticsfreak (see all)
 Few interesting questions related to correlation  July 22, 2016
 How to make a reproducible example to share?  July 21, 2016
 Few random questions on Random Forest  July 20, 2016