<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=R_-_Quiz</id>
	<title>R - Quiz - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=R_-_Quiz"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=R_-_Quiz&amp;action=history"/>
	<updated>2026-05-14T01:23:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=R_-_Quiz&amp;diff=69920&amp;oldid=prev</id>
		<title>RethabileM: /* Quiz */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=R_-_Quiz&amp;diff=69920&amp;oldid=prev"/>
		<updated>2018-11-19T05:48:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Quiz&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Intro to R|999]]&lt;br /&gt;
== Quiz ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression &lt;br /&gt;
 2**4&lt;br /&gt;
returns:&lt;br /&gt;
* 16&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 2&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We want to select two columns from a data frame called &amp;#039;&amp;#039;Clients&amp;#039;&amp;#039;, which expression is correct:&lt;br /&gt;
* Clients[,c(1,2)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 3&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
What is the value of the expression&lt;br /&gt;
 2+NA&lt;br /&gt;
&lt;br /&gt;
* NA&lt;br /&gt;
apply&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 4&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you want to calculate mean for each level in a factor, you would use which function:&lt;br /&gt;
&lt;br /&gt;
* tapply&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 5&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We toss a fair coin 16 times, how to calculate probability of getting 7 or less tails&lt;br /&gt;
* pbinom(7,prob=0.5,size=16)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 6&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
We want to compare two means, which is the best function to use:&lt;br /&gt;
* meantest&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 7&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
In order to add rows to a data frame which function is the most appropriate:&lt;br /&gt;
* addrows&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Question 8&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to plot a bar chart, which function would you use:&lt;br /&gt;
* barplot&lt;/div&gt;</summary>
		<author><name>RethabileM</name></author>
	</entry>
</feed>