<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd="http://schemas.google.com/g/2005"><id>tag:blogger.com,1999:blog-7958828565254404797.post8502029836370661540..comments</id><updated>2024-12-13T03:11:35.450-08:00</updated><title type='text'>Comments on ListenData: R Which Function Explained</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.listendata.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/8502029836370661540/comments/default'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2015/10/r-which-function-explained.html'/><link rel="hub" href="http://pubsubhubbub.appspot.com/"/><author><name>Deepanshu Bhalla</name><uri>http://www.blogger.com/profile/09802839558125192674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXm_iOrXFR9Ls-mjtOci4qd1m1V1TXkkWJINuMy84-Axo5pNS6CG7oKwR7hfHHI3tB1yuz8W_qo9HK2Cw5fHfe_4cL_2DCf_LyoK9LMLicZojbNYgypIP-RXNsw1GsVhk/s100/pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-6186217786088860691</id><published>2015-12-28T12:30:04.292-08:00</published><updated>2015-12-28T12:30:04.292-08:00</updated><title type='text'>In R, there are multiple ways to accomplish the sa...</title><content type='html'>In R, there are multiple ways to accomplish the same task. I was just explaining the usage of &amp;#39;WHICH&amp;#39; function. Yes, the question 5 should be answered with sum(ls$x1 == ls$x2) as it is more efficient.&lt;br /&gt;&lt;br /&gt;Check out the following analysis -&lt;br /&gt;&lt;br /&gt;ls = data.frame( x1 = ceiling(runif(10000000)*10),&lt;br /&gt;                 x2 = ceiling(runif(10000000)*10))&lt;br /&gt;&lt;br /&gt;start.time &amp;lt;- Sys.time()&lt;br /&gt;length(which(ls$x1 == ls$x2))&lt;br /&gt;end.time &amp;lt;- Sys.time()&lt;br /&gt;time.taken &amp;lt;- end.time - start.time&lt;br /&gt;time.taken&lt;br /&gt;&lt;br /&gt;start.time &amp;lt;- Sys.time()&lt;br /&gt;sum(ls$x1 == ls$x2)&lt;br /&gt;end.time &amp;lt;- Sys.time()&lt;br /&gt;time.taken &amp;lt;- end.time - start.time&lt;br /&gt;time.taken</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/8502029836370661540/comments/default/6186217786088860691'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/8502029836370661540/comments/default/6186217786088860691'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2015/10/r-which-function-explained.html?showComment=1451334604292#c6186217786088860691' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/8502029836370661540/comments/default/8953649027341039600'/><author><name>Deepanshu Bhalla</name><uri>https://www.blogger.com/profile/09802839558125192674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXm_iOrXFR9Ls-mjtOci4qd1m1V1TXkkWJINuMy84-Axo5pNS6CG7oKwR7hfHHI3tB1yuz8W_qo9HK2Cw5fHfe_4cL_2DCf_LyoK9LMLicZojbNYgypIP-RXNsw1GsVhk/s100/pic.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2015/10/r-which-function-explained.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-8502029836370661540' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/8502029836370661540' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-966036103"/><gd:extendedProperty name="blogger.displayTime" value="December 28, 2015 at 12:30 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-8953649027341039600</id><published>2015-12-27T07:33:57.059-08:00</published><updated>2015-12-27T07:33:57.059-08:00</updated><title type='text'>Hello,&#xa;&#xa;I think that question 5 could be answered ...</title><content type='html'>Hello,&lt;br /&gt;&lt;br /&gt;I think that question 5 could be answered in a more concise way.&lt;br /&gt;sum(ls$x1 == ls$x2)&lt;br /&gt;&lt;br /&gt;What do you think of my answer?&lt;br /&gt;&lt;br /&gt;Best regards&lt;br /&gt;Cédric Guilmin</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/8502029836370661540/comments/default/8953649027341039600'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/8502029836370661540/comments/default/8953649027341039600'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2015/10/r-which-function-explained.html?showComment=1451230437059#c8953649027341039600' title=''/><author><name>Cédric Guilmin</name><uri>https://www.blogger.com/profile/08130248321068140744</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2015/10/r-which-function-explained.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-8502029836370661540' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/8502029836370661540' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-1469252467"/><gd:extendedProperty name="blogger.displayTime" value="December 27, 2015 at 7:33 AM"/></entry></feed>