<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>生信菜鸟团 &#187; list</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/list/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bio-info-trainee.com</link>
	<description>欢迎去论坛biotrainee.com留言参与讨论，或者关注同名微信公众号biotrainee</description>
	<lastBuildDate>Sat, 28 Jun 2025 14:30:13 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.33</generator>
	<item>
		<title>R语言也可以用hash啦</title>
		<link>http://www.bio-info-trainee.com/1097.html</link>
		<comments>http://www.bio-info-trainee.com/1097.html#comments</comments>
		<pubDate>Fri, 30 Oct 2015 07:54:19 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[list]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=1097</guid>
		<description><![CDATA[本来想着是如何习惯R里面的list对象，来实现hash的功能，无意中发现了居然还 &#8230; <a href="http://www.bio-info-trainee.com/1097.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>本来想着是如何习惯R里面的list对象，来实现hash的功能，无意中发现了居然还有这个包</p>
<p>https://cran.r-project.org/web/packages/hash/hash.pdf</p>
<p>我简单看了看文档，的确跟perl里面的hash功能类似，非常好用。</p>
<p>创建一个hash很简单</p>
<p>h &lt;- hash( keys=letters, values=1:26 )</p>
<p>h &lt;- hash( letters, 1:26 )</p>
<p>类似于下面的列表</p>
<p>L=setNames(as.list(LETTERS),1:26)</p>
<p>如果是列表要提取keys需要用names函数，如果需要提取values，需要用unlist函数，而用了hash之后，这两个函数就可以独自运行啦</p>
<p>还有很多其它函数，其实在list中也可以实现，主要是看你对哪种语法更熟悉，感觉自己现在编程能力差不多算是小有所成了，看什么都一样了，要是以前学R的时候看到了这个hash包，我肯定会很兴奋的！</p>
<p>clear signature(x = "hash"): Remove all key-value pairs from hash<br />
del signature(x = "ANY", hash = "hash"): Remove specified key-value pairs from hash<br />
has.key signature(key = "ANY", hash = "hash"): Test for existence of key<br />
is.empty signature(x = "hash"): Test if no key-values are assigned<br />
length signature(x = "hash"): Return number of key-value pairs from the hash<br />
keys signature(hash = "hash"): Retrieve keys from hash<br />
values signature(x = "hash"): Retrieve values from hash<br />
copy signature(x = "hash"): Make a copy of a hash using a new environment.<br />
format signature(x = "hash"): Internal function for displaying hash</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/1097.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
