<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://www.simswiki.info/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://simswiki.info/index.php?action=history&amp;feed=atom&amp;title=Describe_all_packages%2FSource_Code</id>
		<title>Describe all packages/Source Code - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://simswiki.info/index.php?action=history&amp;feed=atom&amp;title=Describe_all_packages%2FSource_Code"/>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=Describe_all_packages/Source_Code&amp;action=history"/>
		<updated>2026-05-26T23:24:43Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://simswiki.info/index.php?title=Describe_all_packages/Source_Code&amp;diff=24216&amp;oldid=prev</id>
		<title>Pne at 18:41, 20 July 2008</title>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=Describe_all_packages/Source_Code&amp;diff=24216&amp;oldid=prev"/>
				<updated>2008-07-20T18:41:22Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:41, 20 July 2008&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=Source=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=Source=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In order to run this function, the user must load (using the &amp;quot;source&amp;quot; function) the script in [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Editing &lt;/del&gt;Detect Pets Body Shop bug/Source Code]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In order to run this function, the user must load (using the &amp;quot;source&amp;quot; function) the script in [[Detect Pets Body Shop bug/Source Code]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pne</name></author>	</entry>

	<entry>
		<id>http://simswiki.info/index.php?title=Describe_all_packages/Source_Code&amp;diff=14919&amp;oldid=prev</id>
		<title>Albmont: First version</title>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=Describe_all_packages/Source_Code&amp;diff=14919&amp;oldid=prev"/>
				<updated>2007-02-25T17:05:16Z</updated>
		
		<summary type="html">&lt;p&gt;First version&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Overview=&lt;br /&gt;
&lt;br /&gt;
This page contains a code in [http://en.wikipedia.org/wiki/R_(programming_language) R] that describes (in a human-readable, text list) all packages.&lt;br /&gt;
&lt;br /&gt;
Use at your own risk. Any comments please use the [[Talk:Describe all packages/Source Code]] page.&lt;br /&gt;
&lt;br /&gt;
=Source=&lt;br /&gt;
&lt;br /&gt;
In order to run this function, the user must load (using the &amp;quot;source&amp;quot; function) the script in [[Editing Detect Pets Body Shop bug/Source Code]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The next routine opens _all_ package files since&lt;br /&gt;
# some date and displays package name and description&lt;br /&gt;
# start_date must be passed as an ISO-8601 string.&lt;br /&gt;
#&lt;br /&gt;
describe_all_packages &amp;lt;- function(start_date = &amp;quot;2005-01-01&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
  # create vector with all filenames that end in .package&lt;br /&gt;
  item_list &amp;lt;- c(&amp;quot;category&amp;quot;, &amp;quot;age&amp;quot;, &amp;quot;gender&amp;quot;, &amp;quot;outfit&amp;quot;)&lt;br /&gt;
  s_date &amp;lt;- as.POSIXlt(start_date, &amp;quot;GMT&amp;quot;)&lt;br /&gt;
  fnlist &amp;lt;- list.files(pattern = &amp;quot;.package$&amp;quot;) &lt;br /&gt;
  cat(&amp;quot;item_list = (&amp;quot;, item_list, &amp;quot;)\n&amp;quot;)&lt;br /&gt;
  for (i in 1:length(fnlist)) {&lt;br /&gt;
    filename &amp;lt;- fnlist[i]&lt;br /&gt;
    # get modification time of package&lt;br /&gt;
    m_date  &amp;lt;- as.POSIXlt(file.info(filename)$mtime, &amp;quot;GMT&amp;quot;)&lt;br /&gt;
    # skip if package is older than start date&lt;br /&gt;
    if (m_date &amp;lt; s_date)&lt;br /&gt;
      next  # in C or similar languages, this would be a continue&lt;br /&gt;
    # now let's do the hard work&lt;br /&gt;
    x &amp;lt;- try(read_package(filename, get.str = T, get.everything = F))&lt;br /&gt;
    # there should be some sanity checks here!&lt;br /&gt;
    if (is.null(x)) {&lt;br /&gt;
      cat(filename, &amp;quot;seems to have another error\n&amp;quot;)&lt;br /&gt;
      next&lt;br /&gt;
    }&lt;br /&gt;
    if (is.null(x$files)) next&lt;br /&gt;
    cat(filename, &amp;quot; &amp;quot;)&lt;br /&gt;
    if (!is.null(x$property.set) &amp;amp; !is.null(x$property.set$human)) {&lt;br /&gt;
      prop &amp;lt;- &amp;quot;&amp;quot;&lt;br /&gt;
      for (item in item_list) {&lt;br /&gt;
        if (!is.null(x$property.set$human[[item]]))&lt;br /&gt;
          prop &amp;lt;- sprintf(&amp;quot;%s %s=%X&amp;quot;, prop, item, x$property.set$human[[item]])&lt;br /&gt;
      }&lt;br /&gt;
      cat(&amp;quot;(&amp;quot;, prop, &amp;quot; ) &amp;quot;, sep=&amp;quot;&amp;quot;)&lt;br /&gt;
    }&lt;br /&gt;
    for (i in 1:length(x$files)) {&lt;br /&gt;
      if (x$index[[i]]$type.id == &amp;quot;53545223&amp;quot;) {&lt;br /&gt;
        cat(x$files[[i]]$human, &amp;quot; &amp;quot;)&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    cat(&amp;quot;\n&amp;quot;)&lt;br /&gt;
  }&lt;br /&gt;
  # done&lt;br /&gt;
  cat(&amp;quot;Total of&amp;quot;, length(fnlist), &amp;quot;files processed\n&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[CPF/Source Code]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Code]]&lt;/div&gt;</summary>
		<author><name>Albmont</name></author>	</entry>

	</feed>