R - Quiz: Difference between revisions
												
				Jump to navigation
				Jump to search
				
RethabileM (talk | contribs)  | 
			
(No difference) 
 | 
Latest revision as of 05:48, 19 November 2018
Quiz
Question 1
The expression
2**4
returns:
- 16
 
Question 2
We want to select two columns from a data frame called Clients, which expression is correct:
- Clients[,c(1,2)]
 
Question 3
What is the value of the expression
2+NA
- NA
 
apply
Question 4
If you want to calculate mean for each level in a factor, you would use which function:
- tapply
 
Question 5
We toss a fair coin 16 times, how to calculate probability of getting 7 or less tails
- pbinom(7,prob=0.5,size=16)
 
Question 6 We want to compare two means, which is the best function to use:
- meantest
 
Question 7 In order to add rows to a data frame which function is the most appropriate:
- addrows
 
Question 8
If you want to plot a bar chart, which function would you use:
- barplot