<?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>Scienco.org</title>
	<atom:link href="http://www.scienco.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scienco.org</link>
	<description>Life&#039;s too short to be unenthusiastic</description>
	<lastBuildDate>Wed, 14 Jul 2010 19:06:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<atom:link rel="next" href="http://www.scienco.org/feed/?page=2" />

		<item>
		<title>STA version 0.2</title>
		<link>http://www.scienco.org/2010/sta-version-0-2/</link>
		<comments>http://www.scienco.org/2010/sta-version-0-2/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 19:06:59 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[STA]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=259</guid>
		<description><![CDATA[Already an update with the following changes from version 0.1: General: Icon changed Decimal separator always &#8220;.&#8221; no matter the chosen locale of the phone (for consistency purposes) Screen rotate issues fixed Distribution tool: Typing error: Continuous distributions density output changed from &#8220;F([input]) = &#8230;&#8221; to &#8220;f([input]) = &#8230;&#8221; Error description at the parameter tab [...]]]></description>
			<content:encoded><![CDATA[<p>Already an update with the following changes from version 0.1:</p>
<p>General:</p>
<ul>
<li>Icon changed</li>
<li>Decimal separator always &#8220;.&#8221; no matter the chosen locale of the phone (for consistency purposes)</li>
<li>Screen rotate issues fixed</li>
</ul>
<p>Distribution tool:</p>
<ul>
<li>Typing error: Continuous distributions density output changed from &#8220;F([input]) = &#8230;&#8221; to &#8220;f([input]) = &#8230;&#8221;</li>
<li>Error description at the parameter tab if the parameters are illegal when trying to plot</li>
<li>Descriptives gets calculated automatically when sampling data</li>
<li>The link under properties has been made clickable</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2010/sta-version-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STA (Statistical Toolbox for Android) version 0.1</title>
		<link>http://www.scienco.org/2010/sta-statistical-toolbox-for-android-version-0-1/</link>
		<comments>http://www.scienco.org/2010/sta-statistical-toolbox-for-android-version-0-1/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 10:50:03 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[STA]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=256</guid>
		<description><![CDATA[Finally, a (&#8220;beta&#8221;) version 0.1 of STA is available on the market. Just search for STA. Please let me know if you run into trouble or would like certain features!]]></description>
			<content:encoded><![CDATA[<p>Finally, a (&#8220;beta&#8221;) version 0.1 of STA is available on the market. Just search for STA. Please let me know if you run into trouble or would like certain features!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2010/sta-statistical-toolbox-for-android-version-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STA: Statistical Toolbox for Android</title>
		<link>http://www.scienco.org/2010/sta-statistical-toolbox-for-android/</link>
		<comments>http://www.scienco.org/2010/sta-statistical-toolbox-for-android/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 13:32:46 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[STA]]></category>
		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=250</guid>
		<description><![CDATA[After having done some preliminary application development for Android (and finally finished my master&#8217;s), I&#8217;ve decided to start a new project. And to blog about the creation of this new project. (As an aside I would really like to point out that I haven&#8217;t forgot about Watexy, but for now it is not possible to [...]]]></description>
			<content:encoded><![CDATA[<p>After having done some preliminary application development for Android (and finally finished my master&#8217;s), I&#8217;ve decided to start a new project. And to blog about the creation of this new project. (As an aside I would really like to point out that I haven&#8217;t forgot about Watexy, but for now it is not possible to improve it.)</p>
<p>The aim of the project is to develop an Android-application with basic statistical tools (I really miss <a href="http://www.r-project.org/">R</a> on my phone, but the project won&#8217;t be a R-clone nevertheless). So far the codename for the application is Statistical Toolbox for Android (or simply STA).</p>
<p>It is not going to be a programming language such as <a title="S programming language" href="http://en.wikipedia.org/wiki/S_programming_language">S</a>, but an easy-to-use graphical statistical toolbox. The features I&#8217;ve thought about including in the first version are:</p>
<ul>
<li>Quantiles (and fractiles) for a wide range of univariate probability distributions</li>
<li>Descriptive statistics (the first two or three empirical moments, correlation measures)</li>
<li>A guide for choosing the right statistical test</li>
</ul>
<p>The features for the later versions could be:</p>
<ul>
<li>Loading datasets (from mail, files on SD-card, or manual input)</li>
<li>A range of statistical tests</li>
</ul>
<p>If any of you have any comments, please do not hesitate to submit a comment here or by mail (use the contact form accessible from the top menu or by sending an e-mail to the reverse of mikl.dk @ scienco ).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2010/sta-statistical-toolbox-for-android/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WatexyML &#8211; Google Wave Robot to convert Latex code to MathML &#8211; almost ready</title>
		<link>http://www.scienco.org/2010/matexy-google-wave-robot-to-convert-latex-code-to-mathml-almost-ready/</link>
		<comments>http://www.scienco.org/2010/matexy-google-wave-robot-to-convert-latex-code-to-mathml-almost-ready/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 07:05:33 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Robots]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Latex]]></category>
		<category><![CDATA[MathML]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Watexy]]></category>
		<category><![CDATA[WatexyML]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=245</guid>
		<description><![CDATA[I&#8217;ve been working on a robot just like Watexy, but instead of converting Latex to images, it should convert to MathML-fonts. And I&#8217;m actually quite far with the robot, so I assume that something will be ready within a couple of days (or maybe a week). Stay tuned! Oh &#8211; and I removed the ads [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a robot just like Watexy, but instead of converting Latex to images, it should convert to MathML-fonts. And I&#8217;m actually quite far with the robot, so I assume that something will be ready within a couple of days (or maybe a week). Stay tuned!</p>
<p>Oh &#8211; and I removed the ads on the site. They was indeed annoying! I hope that you will help the development and server expenses by donating a bit if you can afford it. And thanks to those who already donated &#8211; it&#8217;s much appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2010/matexy-google-wave-robot-to-convert-latex-code-to-mathml-almost-ready/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Watexy version 14 – with both inline and display math mode</title>
		<link>http://www.scienco.org/2009/watexy-version-14-%e2%80%93-with-both-inline-and-display-math-mode/</link>
		<comments>http://www.scienco.org/2009/watexy-version-14-%e2%80%93-with-both-inline-and-display-math-mode/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 23:15:01 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Robots]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Latex]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Watexy]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=241</guid>
		<description><![CDATA[Now version 14 of watexy@appspot.com is released. $ $x$ $ makes an inline equation (with the $-signs immediately following each other and not with a space as here). \[ 4 + 5 \] makes an equation in &#8220;display math mode&#8221;, i.e. centred on its own line. Edit by clicking at the equation (the image). There [...]]]></description>
			<content:encoded><![CDATA[<p>Now version 14 of watexy@appspot.com is released.</p>
<p>$ $x$ $ makes an inline equation (with the $-signs immediately following each other and not with a space as here).<br />
\[ 4 + 5 \] makes an equation in &#8220;display math mode&#8221;, i.e. centred on its own line. Edit by clicking at the equation (the image).</p>
<p>There are still a few misbehaviours/new feature suggestions:</p>
<ul>
<li>Inline equations still doesn&#8217;t support &lt; and &gt;</li>
<li>It&#8217;s still not possible to edit the inline equations</li>
<li>Have an align environment so that several equations can be shown underneath each other</li>
<li>The height of the equation in display math mode doesn&#8217;t always adjust automatically, so it may be necessary to either click it to edit and the press cancel or view another wave and go back to the original one</li>
<li>The history of how an equations is changed (editing by clicking on it) is not recorded, so for know it&#8217;s not possible to track changes to a single equations. Yet.</li>
</ul>
<p>I&#8217;m of course still working to fix these things, but it might not be solved until January because I&#8217;m going to travel the rest of the year.</p>
<p>Thanks a lot for your support and all the feedback. Please continue to comment on how the robot is made, bugs, and suggestions! I&#8217;m also on Twitter at <a href="http://twitter.com/mikldk">http://twitter.com/mikldk</a>.</p>
<p>A last request: If you can afford, please donate money to support my work and expenses. You&#8217;ll find the donate-button in the upper right corner of this page. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/watexy-version-14-%e2%80%93-with-both-inline-and-display-math-mode/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Watexy-test (with edit and working &lt; and &gt;)</title>
		<link>http://www.scienco.org/2009/watexy-test-with-edit-and-working-and/</link>
		<comments>http://www.scienco.org/2009/watexy-test-with-edit-and-working-and/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 01:45:28 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Robots]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Latex]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Watexy]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=233</guid>
		<description><![CDATA[I&#8217;m a new version of Watexy with the possibility to edit equations and fixes the bug with &#60; and &#62; not working. The testing-robot is: watexy-test@appspot.com It only works in wave.google.com and not in wavesandbox.com for some reason. I hope you&#8217;ll take the time to give it a try and some feedback to improve it.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a new version of Watexy with the possibility to edit equations and fixes the bug with &lt; and &gt; not working.</p>
<p>The testing-robot is:<br />
watexy-test@appspot.com</p>
<p><span style="text-decoration: line-through;">It only works in wave.google.com and not in wavesandbox.com for some reason.</span></p>
<p>I hope you&#8217;ll take the time to give it a try and some feedback to improve it.</p>
<p><a href="http://www.scienco.org/wp-content/watexy-test.PNG"><img class="aligncenter size-full wp-image-234" title="watexy-test" src="http://www.scienco.org/wp-content/watexy-test.PNG" alt="watexy-test" width="536" height="416" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/watexy-test-with-edit-and-working-and/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Watexy version 12 &#8211; now supporting multiple equations in one blip</title>
		<link>http://www.scienco.org/2009/watexy-version-12-now-supporting-multiple-equations-in-one-blip/</link>
		<comments>http://www.scienco.org/2009/watexy-version-12-now-supporting-multiple-equations-in-one-blip/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 00:00:52 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Robots]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Latex]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Watexy]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=231</guid>
		<description><![CDATA[First of all, thanks for the feed-back in [1]. I&#8217;ve now fixed three things: 1) It&#8217;s now possible to put more than one equation in a blip, and they all get nicely/properly displayed, thanks to Michael, post 18 in [1] for a possible solution 2) Instead of using http://www.forkosh.dreamhost.com/mathtex.cgi , I&#8217;ve now installed the program [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, thanks for the feed-back in [1].</p>
<p>I&#8217;ve now fixed three things:<br />
1) It&#8217;s now possible to put more than one equation in a blip, and they all get nicely/properly displayed, thanks to Michael, post 18 in [1] for a possible solution<br />
2) Instead of using http://www.forkosh.dreamhost.com/mathtex.cgi , I&#8217;ve now installed the program on one of my own servers (thanks a lot for both the software and the service)<br />
3) Multi-line is supported, such that the equation can be written over multiple lines and still be matched correctly</p>
<p>Please do not hesitate to comment this version as well!</p>
<p>By the way, I&#8217;m sorry for the delay with this new version. My life as an exchange student in Australia has been a bit hectic with all the travelling besides the studies.</p>
<p>[1]: http://www.scienco.org/2009/watexy-latex-robot-for-google-wave/</p>
<p>The new code is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># Python reference:</span>
<span style="color: #808080; font-style: italic;"># http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/index.html</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Shortcut to the important OpBasedDocument</span>
<span style="color: #808080; font-style: italic;"># http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/waveapi.ops.OpBasedDocument-class.html</span>
&nbsp;
__author__ = <span style="color: #483d8b;">'mikl@mikl.dk (Mikkel Meyer Andersen)'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">re</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> waveapi <span style="color: #ff7700;font-weight:bold;">import</span> events
<span style="color: #ff7700;font-weight:bold;">from</span> waveapi <span style="color: #ff7700;font-weight:bold;">import</span> model
<span style="color: #ff7700;font-weight:bold;">from</span> waveapi <span style="color: #ff7700;font-weight:bold;">import</span> robot
<span style="color: #ff7700;font-weight:bold;">from</span> waveapi <span style="color: #ff7700;font-weight:bold;">import</span> document
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> OnRobotAdded<span style="color: black;">&#40;</span>properties, context<span style="color: black;">&#41;</span>:
  <span style="color: #483d8b;">&quot;&quot;&quot;Invoked when the robot has been added.&quot;&quot;&quot;</span>
  root_wavelet = context.<span style="color: black;">GetRootWavelet</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
  root_wavelet.<span style="color: black;">CreateBlip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">GetDocument</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">SetText</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Hi. My name is Watexy and I'm here to help you presenting Latex in waves. Just put the latex between $$ and $$, e.g. $$2+2=5$$.&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> reversed_iterator<span style="color: black;">&#40;</span><span style="color: #008000;">iter</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">reversed</span><span style="color: black;">&#40;</span><span style="color: #008000;">list</span><span style="color: black;">&#40;</span><span style="color: #008000;">iter</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> OnBlipSubmitted<span style="color: black;">&#40;</span>properties, context<span style="color: black;">&#41;</span>:
  <span style="color: #483d8b;">&quot;&quot;&quot;Invoked when a blip has been added.&quot;&quot;&quot;</span>
  blip = context.<span style="color: black;">GetBlipById</span><span style="color: black;">&#40;</span>properties<span style="color: black;">&#91;</span><span style="color: #483d8b;">'blipId'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> 
  blip_text_view = blip.<span style="color: black;">GetDocument</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
  matches = <span style="color: #dc143c;">re</span>.<span style="color: black;">finditer</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\$</span><span style="color: #000099; font-weight: bold;">\$</span>(.+?)<span style="color: #000099; font-weight: bold;">\$</span><span style="color: #000099; font-weight: bold;">\$</span>'</span>, blip_text_view.<span style="color: black;">GetText</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, <span style="color: #dc143c;">re</span>.<span style="color: black;">DOTALL</span><span style="color: black;">&#41;</span>
&nbsp;
  <span style="color: #483d8b;">&quot;&quot;&quot;
  Reverse list such that the last items will be changed first, such that
  the positions for the first items doesn't change
  &quot;&quot;&quot;</span>
  matches = reversed_iterator<span style="color: black;">&#40;</span>matches<span style="color: black;">&#41;</span>
&nbsp;
  <span style="color: #ff7700;font-weight:bold;">for</span> m <span style="color: #ff7700;font-weight:bold;">in</span> matches:
    <span style="color: #483d8b;">&quot;&quot;&quot;
    The +/- 2 is because of the length of the $$'s. 
    If not removed, the loop will run infintely! 
    &quot;&quot;&quot;</span>
    blip_text_view.<span style="color: black;">DeleteRange</span><span style="color: black;">&#40;</span>document.<span style="color: black;">Range</span><span style="color: black;">&#40;</span>m.<span style="color: black;">start</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>-<span style="color: #ff4500;">2</span>, m.<span style="color: black;">end</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>+<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    image = document.<span style="color: black;">Image</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'http://meyer.fm/cgi-bin/mathtex.cgi?'</span> + m.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>, caption=m.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    blip_text_view.<span style="color: black;">InsertElement</span><span style="color: black;">&#40;</span>m.<span style="color: black;">start</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>-<span style="color: #ff4500;">2</span>, image<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
  myRobot = robot.<span style="color: black;">Robot</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'watexy'</span>,
      image_url=<span style="color: #483d8b;">'http://watexy.appspot.com/assets/icon.png'</span>,
      version=<span style="color: #483d8b;">'12'</span>,
      profile_url=<span style="color: #483d8b;">'http://watexy.appspot.com/'</span><span style="color: black;">&#41;</span>
  myRobot.<span style="color: black;">RegisterHandler</span><span style="color: black;">&#40;</span>events.<span style="color: black;">WAVELET_SELF_ADDED</span>, OnRobotAdded<span style="color: black;">&#41;</span>
  myRobot.<span style="color: black;">RegisterHandler</span><span style="color: black;">&#40;</span>events.<span style="color: black;">BLIP_SUBMITTED</span>, OnBlipSubmitted<span style="color: black;">&#41;</span>
  myRobot.<span style="color: black;">Run</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/watexy-version-12-now-supporting-multiple-equations-in-one-blip/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>qqmultinorm.R version 1.1 &#8211; more intelligent plot size</title>
		<link>http://www.scienco.org/2009/qqmultinorm-r-version-1-1-more-intelligent-plot-size/</link>
		<comments>http://www.scienco.org/2009/qqmultinorm-r-version-1-1-more-intelligent-plot-size/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 07:20:47 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=229</guid>
		<description><![CDATA[I&#8217;ve updated the qqmultinorm.R script a bit so that it&#8217;s now capable of picking a more optimal plot size (less unused space). The idea refers to deciding the sides (dimensions) of a rectangle if the areal (number of plots) is known i.e., optimising the dimensions of a rectangle given the areal. We want the perimeter [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the qqmultinorm.R script a bit so that it&#8217;s now capable of picking a more optimal plot size (less unused space).</p>
<p>The idea refers to deciding the sides (dimensions) of a rectangle if the areal (number of plots) is known i.e., optimising the dimensions of a rectangle given the areal. We want the perimeter as small as possible (for better viewing), preferably wider than longer if square isn&#8217;t possible. A given number n is factorised in to numbers within a given error. For example if the allowed error is 2, then 7 gets factorised in (1,7), (2, 4), (4, 2), and (7, 1) (here redundant factorisation is included). Although 2*4 = 8, but abs(7-8) = 1 <= 2, so it's acceptable. Actually the default error is 10% of the input areal.</p>
<p>The way the proper factorisations is chosen, is by ordering the pairs by ascending the difference of the components i.e, how much the width and height differs. And then ordered ascending by height so that the plot gets wide screen-like instead of poster-like.</p>
<p>The new script is a follows (only find.optimal.mfrow.size(...) and a bit logic in qqmultinorm(...) added):</p>

<div class="wp_syntax"><div class="code"><pre class="r" style="font-family:monospace;"># File name: qqmultinorm.R
# Version: 1.1
# Last updated: 2009-08-28
#
# This R-code is made by:
# Mikkel Meyer Andersen, Denmark
# mikl [funny-a] math [.] aau [.] dk or 
# mikl [funny-a] mikl [.] dk
#
# Licence: GPLv2
#
# Feel free to use it, but if you do I'll like to hear about it (just for fun).
# If you make corrections, please submit them back so others can enjoy them as well.
&nbsp;
qqchisq &lt;- function(y, main, df=2, continuity.correction = 0.5)
{
  n &lt;- length(y)
  y &lt;- sort(y)
  c &lt;- numeric(n)
&nbsp;
  for (i in 1:n)
    c[i] &lt;- qchisq((i-continuity.correction)/n, df=df)
&nbsp;
  plot(c, y, xlab=&quot;Theoretical Quantiles&quot;, ylab=&quot;Sample Quantiles&quot;, main=main)
  lines(c(c[1], c[n]), c(c[1], c[n]), type=&quot;l&quot;)
}
&nbsp;
dec2bin &lt;- function(x)
{
  if (!is.vector(x) || length(x) != 1 || x &lt; 0)
    stop(&quot;x must be a non-negative integer&quot;)
&nbsp;
  N &lt;- length(x)
  ndigits &lt;- floor(log2(x)) + 1
  bin &lt;- numeric(ndigits)
&nbsp;
  for (i in (ndigits-1):0)
  {
    tmp &lt;- 2^i
&nbsp;
    if (x %/% tmp &gt;= 1)
    {
      bin[i+1] &lt;- 1
      x &lt;- x - tmp
    }
  }
&nbsp;
  return(rev(bin))
}
&nbsp;
# Returns the power set without the empty set
power.set &lt;- function(v)
{
  n &lt;- length(v)  
  N &lt;- 2^n - 1
  ps &lt;- vector(&quot;list&quot;, N)
&nbsp;
  for (i in 1:(N-1))
  {
    Nbin &lt;- dec2bin(i)
    Nbin &lt;- c(numeric(n-length(Nbin)), Nbin)
    Nbin &lt;- rev(Nbin)
    ps[[i]] &lt;- v[which(Nbin == 1)]
  }
&nbsp;
  ps[[N]] &lt;- v
&nbsp;
  return(ps)
}
&nbsp;
# Input: n
#  - here the number of plots
# Returns c(h, w)
#  - the optimal choice of rows and cols to use in in mfrow
find.optimal.mfrow.size &lt;- function(n)
{  
  w0 &lt;- ceiling(sqrt(n))
&nbsp;
  # The area can at max contain of 10% unused space
  max.error &lt;- round(n*0.1)
&nbsp;
  n.minus.error &lt;- n - max.error
  n.plus.error &lt;- n + max.error
&nbsp;
  # If n is a square, fine!
  if (w0^2 == n)
    return(c(w0, w0))
&nbsp;
  # Col 1 and 2: w and h
  # Col 3: The difference between w and h: this should be as small as possible
  candidates &lt;- matrix(ncol=3)
&nbsp;
  for (w in w0:1)  
  {    
    h &lt;- ceiling(n / w)
    n0 &lt;- w*h
&nbsp;
    # Because of ceiling we know that n0 &gt;= n
    if (n0 &lt;= n.plus.error)
      candidates &lt;- rbind(candidates, c(h, w, abs(w-h)))
  }
&nbsp;
  # First row is NA
  candidates &lt;- candidates[-1,]
&nbsp;
  # Uups, something went wront - well, don't panic
  if (nrow(candidates) == 0)
    return(c(w0, w0))
&nbsp;
  # First order by abs(w-h) and then by h to get a widescreen-look 
  # instead of a poster-look
  candidates &lt;- candidates[order(candidates[,3], candidates[,1]), ]
&nbsp;
  return(candidates[1, c(1,2)])
}
&nbsp;
# dataset: variables in columns and observations as rows
# subset.min.size, subset.max.size: inclusive limits
# filename: if specified, the plot are saved as a png file with this filename
qqmultinorm &lt;- function(dataset, subset.min.size = 1, subset.max.size = 4, filename = NULL, use.optimale.size = F)
{
  p &lt;- ncol(dataset)
  n &lt;- nrow(dataset)
&nbsp;
  if (subset.min.size &lt; 1) stop(&quot;subset.min.size &lt; 1&quot;)
  if (subset.min.size &gt; p) stop(&quot;subset.min.size &gt; p&quot;)
  if (subset.max.size &lt; 1) stop(&quot;subset.max.size &lt; 1&quot;)
  if (subset.max.size &gt; p) stop(&quot;subset.max.size &gt; p&quot;)
  if (subset.min.size &gt; subset.max.size) stop(&quot;subset.min.size &gt; subset.max.size&quot;)
&nbsp;
  if (is.null(colnames(dataset)))
    colnames(dataset) &lt;- 1:p
&nbsp;
  # We have p variables. If all is to be checked against each other,
  # then we have a power-set with 2^p subsets (including the empty set)
&nbsp;
  # Here we get subset containing indexes of the variables to include
  # Note that power.set doesn't include the empty set.
  subsets &lt;- power.set(1:p)
  subsets.len &lt;- length(subsets)
&nbsp;
  # To get the plots with the fewest variables first, we do a litte trick:
  # While we find out which plots to include, we build a list
  # where each element of a list is the index of the subset,
  # and the index of the element is the size of the subset.
  # (The +1 is because the limits are includesive!)
  s.included &lt;- vector(&quot;list&quot;, subset.max.size - subset.min.size + 1)
&nbsp;
  plots &lt;- 0
&nbsp;
  for (i in 1:subsets.len)
  {
    s &lt;- subsets[[i]]
    s.len &lt;- length(s)
&nbsp;
    if (s.len &gt;= subset.min.size &amp;&amp; s.len &lt;= subset.max.size)
    {
      plots &lt;- plots + 1
      s.included[[s.len - subset.min.size + 1]] &lt;- c(s.included[[s.len - subset.min.size + 1]], i)
    }
  }
&nbsp;
  # Now it's possible to build the subset index vector; 
  # we disregard the size of each subset; no more need to know it.
  s.indexes &lt;- c()
&nbsp;
  for (s in s.included)
  {
    s.indexes &lt;- c(s.indexes, s)
  }
&nbsp;
  # We want the best view  
  plot.per.row &lt;- ceiling(plots^(1/2))
  plot.per.column &lt;- ceiling(plots^(1/2))
&nbsp;
  if (use.optimale.size)
  {
    mfrow.parameters &lt;- find.optimal.mfrow.size(plots)
    plot.per.row &lt;- mfrow.parameters[1]
    plot.per.column &lt;- mfrow.parameters[2]
  }
&nbsp;
  plot.width &lt;- 300
  plot.height &lt;- 200
&nbsp;
  if (!is.null(filename))
    png(file=paste(filename, &quot;.png&quot;, sep=&quot;&quot;), bg=&quot;white&quot;, width = plot.per.row * plot.width, height = plot.per.column * plot.height)
&nbsp;
  par(mfrow = c(plot.per.row, plot.per.column))  
&nbsp;
  # There's no need to calculate a whole lot several times:
  ybar &lt;- as.vector(colMeans(dataset))
&nbsp;
  S &lt;- as.matrix(var(dataset))
&nbsp;
  current &lt;- 1  
  for (i in s.indexes)
  {
    s &lt;- subsets[[i]]
    s.len &lt;- length(s)
&nbsp;
    if (s.len &gt; subset.max.size)
      next
&nbsp;
    cat(&quot;Processing subset no.&quot;, current, &quot;out of&quot;, plots, &quot;\n&quot;)
&nbsp;
    # Container for our values
    squared.dist &lt;- numeric(n)
&nbsp;
    # qr.solve(A) = A^(-1)  
    Sinv &lt;- qr.solve(S[s,s])
&nbsp;
    # Then calculate the squared distance for each datapoint
    for (i in 1:n)
    {
      c &lt;- dataset[i,s] - ybar[s]
      squared.dist[i] &lt;- t(c) %*% Sinv %*% c
    }
&nbsp;
    # Finding the order statistic
    squared.dist &lt;- sort(squared.dist)
&nbsp;
    qqchisq(squared.dist, paste(colnames(dataset)[s], collapse=&quot;, &quot;), s.len)
&nbsp;
    current &lt;- current + 1
  }
&nbsp;
  if (!is.null(filename))
    dev.off()
}
&nbsp;
# Example:
A &lt;- matrix(rnorm(2000, mean=3, sd=2), ncol=8)
qqmultinorm(A, 2, 2, &quot;multinorm-optimal.size&quot;, use.optimale.size = T)
qqmultinorm(A, 2, 2, &quot;multinorm&quot;, use.optimale.size = F)</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/qqmultinorm-r-version-1-1-more-intelligent-plot-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>qqmultinorm.R &#8211; evaluating the normality of a sample</title>
		<link>http://www.scienco.org/2009/qqmultinorm-r-evaluating-the-normality-of-a-sample/</link>
		<comments>http://www.scienco.org/2009/qqmultinorm-r-evaluating-the-normality-of-a-sample/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 11:44:00 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=225</guid>
		<description><![CDATA[I wrote a R-script that can be used to evaluate for multivariate normality of a sample. It&#8217;s a kind of generalisation to the qqnorm, but this one just uses sums of the squared statistical distance which is then chi squared distributed with degrees of freedom equalling the number of squared statistical distance summed. The useful [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a R-script that can be used to evaluate for multivariate normality of a sample. It&#8217;s a kind of generalisation to the qqnorm, but this one just uses sums of the squared statistical distance which is then chi squared distributed with degrees of freedom equalling the number of squared statistical distance summed.</p>
<p>The useful thing about this script, is that it&#8217;s able to plot all possible combinations of the variables. It&#8217;s possible to specify the minimum number of variables to compare and the maximum number of variables to compare. All possible combinations are found by calculating the power set (using binary representation through the decimal to binary conversion, dec2bin, because if a set has k elements, then its power set has 2^k elements, and the binary representation of the numbers from 1 to 2^k are then used to pick out the subsets in the power set).</p>
<p>Please notice that it&#8217;s possible to specify a filename so that the plots are written to a png file. This is by far the easiest thing &#8211; and only possibility &#8211; if there&#8217;s more than a few plots.</p>
<p>I haven&#8217;t wrote a lot of documentation besides this, but feel free to ask if in doubt of anything!</p>

<div class="wp_syntax"><div class="code"><pre class="r" style="font-family:monospace;"># File name: qqmultinorm.R
#
# This R-code is made by:
# Mikkel Meyer Andersen, Denmark
# mikl [funny-a] math [.] aau [.] dk or 
# mikl [funny-a] mikl [.] dk
#
# Licence: GPLv2
#
# Feel free to use it, but if you do I'll like to hear about it (just for fun).
# If you make corrections, please submit them back so others can enjoy them as well.
&nbsp;
qqchisq &lt;- function(y, main, df=2, continuity.correction = 0.5)
{
  n &lt;- length(y)
  y &lt;- sort(y)
  c &lt;- numeric(n)
&nbsp;
  for (i in 1:n)
    c[i] &lt;- qchisq((i-continuity.correction)/n, df=df)
&nbsp;
  plot(c, y, xlab=&quot;Theoretical Quantiles&quot;, ylab=&quot;Sample Quantiles&quot;, main=main)
  lines(c(c[1], c[n]), c(c[1], c[n]), type=&quot;l&quot;)
}
&nbsp;
dec2bin &lt;- function(x)
{
  if (!is.vector(x) || length(x) != 1 || x &lt; 0)
    stop(&quot;x must be a non-negative integer&quot;)
&nbsp;
  N &lt;- length(x)
  ndigits &lt;- floor(log2(x)) + 1
  bin &lt;- numeric(ndigits)
&nbsp;
  for (i in (ndigits-1):0)
  {
    tmp &lt;- 2^i
&nbsp;
    if (x %/% tmp &gt;= 1)
    {
      bin[i+1] &lt;- 1
      x &lt;- x - tmp
    }
  }
&nbsp;
  return(rev(bin))
}
&nbsp;
# Returns the power set without the empty set
power.set &lt;- function(v)
{
  n &lt;- length(v)  
  N &lt;- 2^n - 1
  ps &lt;- vector(&quot;list&quot;, N)
&nbsp;
  for (i in 1:(N-1))
  {
    Nbin &lt;- dec2bin(i)
    Nbin &lt;- c(numeric(n-length(Nbin)), Nbin)
    Nbin &lt;- rev(Nbin)
    ps[[i]] &lt;- v[which(Nbin == 1)]
  }
&nbsp;
  ps[[N]] &lt;- v
&nbsp;
  return(ps)
}
&nbsp;
# dataset: variables in columns and observations as rows
# subset.min.size, subset.max.size: inclusive limits
# filename: if specified, the plot are saved as a png file with this filename
qqmultinorm &lt;- function(dataset, subset.min.size = 1, subset.max.size = 4, filename = NULL)
{
  p &lt;- ncol(dataset)
  n &lt;- nrow(dataset)
&nbsp;
  if (subset.min.size &lt; 1) stop(&quot;subset.min.size &lt; 1&quot;)
  if (subset.min.size &gt; p) stop(&quot;subset.min.size &gt; p&quot;)
  if (subset.max.size &lt; 1) stop(&quot;subset.max.size &lt; 1&quot;)
  if (subset.max.size &gt; p) stop(&quot;subset.max.size &gt; p&quot;)
  if (subset.min.size &gt; subset.max.size) stop(&quot;subset.min.size &gt; subset.max.size&quot;)
&nbsp;
  if (is.null(colnames(dataset)))
    colnames(dataset) &lt;- 1:p
&nbsp;
  # We have p variables. If all is to be checked against each other,
  # then we have a power-set with 2^p subsets (including the empty set)
&nbsp;
  # Here we get subset containing indexes of the variables to include
  # Note that power.set doesn't include the empty set.
  subsets &lt;- power.set(1:p)
  subsets.len &lt;- length(subsets)
&nbsp;
  # To get the plots with the fewest variables first, we do a litte trick:
  # While we find out which plots to include, we build a list
  # where each element of a list is the index of the subset,
  # and the index of the element is the size of the subset.
  # (The +1 is because the limits are includesive!)
  s.included &lt;- vector(&quot;list&quot;, subset.max.size - subset.min.size + 1)
&nbsp;
  plots &lt;- 0
&nbsp;
  for (i in 1:subsets.len)
  {
    s &lt;- subsets[[i]]
    s.len &lt;- length(s)
&nbsp;
    if (s.len &gt;= subset.min.size &amp;&amp; s.len &lt;= subset.max.size)
    {
      plots &lt;- plots + 1
      s.included[[s.len - subset.min.size + 1]] &lt;- c(s.included[[s.len - subset.min.size + 1]], i)
    }
  }
&nbsp;
  # Now it's possible to build the subset index vector; 
  # we disregard the size of each subset; no more need to know it.
  s.indexes &lt;- c()
&nbsp;
  for (s in s.included)
  {
    s.indexes &lt;- c(s.indexes, s)
  }
&nbsp;
  # We want a squared view
  plot.per.row &lt;- ceiling(plots^(1/2))
  plot.per.column &lt;- ceiling(plots^(1/2))
  plot.width &lt;- 200
  plot.height &lt;- 200
&nbsp;
  if (!is.null(filename))
    png(file=paste(filename, &quot;.png&quot;, sep=&quot;&quot;), bg=&quot;white&quot;, width = plot.per.row * plot.width, height = plot.per.column * plot.height)
&nbsp;
  par(mfrow = c(plot.per.row, plot.per.column))  
&nbsp;
  # There's no need to calculate a whole lot several times:
  ybar &lt;- as.vector(colMeans(dataset))
&nbsp;
  S &lt;- as.matrix(var(dataset))
&nbsp;
  current &lt;- 1  
  for (i in s.indexes)
  {
    s &lt;- subsets[[i]]
    s.len &lt;- length(s)
&nbsp;
    if (s.len &gt; subset.max.size)
      next
&nbsp;
    cat(&quot;Processing subset no.&quot;, current, &quot;out of&quot;, plots, &quot;\n&quot;)
&nbsp;
    # Container for our values
    squared.dist &lt;- numeric(n)
&nbsp;
    # qr.solve(A) = A^(-1)  
    Sinv &lt;- qr.solve(S[s,s])
&nbsp;
    # Then calculate the squared distance for each datapoint
    for (i in 1:n)
    {
      c &lt;- dataset[i,s] - ybar[s]
      squared.dist[i] &lt;- t(c) %*% Sinv %*% c
    }
&nbsp;
    # Finding the order statistic
    squared.dist &lt;- sort(squared.dist)
&nbsp;
    qqchisq(squared.dist, paste(colnames(dataset)[s], collapse=&quot;, &quot;), s.len)
&nbsp;
    current &lt;- current + 1
  }
&nbsp;
  if (!is.null(filename))
    dev.off()
}
&nbsp;
# Example:
A &lt;- matrix(rnorm(2000, mean=3, sd=2), ncol=8)
qqmultinorm(A, 1, 3, &quot;multinorm-1-3&quot;)
#qqmultinorm(A, 4, 4, &quot;multinorm-4&quot;)
#qqmultinorm(A, 5, 5, &quot;multinorm-5&quot;)
#qqmultinorm(A, 6, 8, &quot;multinorm-6-8&quot;)</pre></div></div>

<div id="attachment_227" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.scienco.org/wp-content/multinorm-1-3.png"><img src="http://www.scienco.org/wp-content/multinorm-1-3-300x300.png" alt="multinorm-1-3" title="multinorm-1-3" width="300" height="300" class="size-medium wp-image-227" /></a><p class="wp-caption-text">multinorm-1-3</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/qqmultinorm-r-evaluating-the-normality-of-a-sample/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splitting up a huge file on one line with sed</title>
		<link>http://www.scienco.org/2009/splitting-up-a-huge-file-on-one-line-with-sed/</link>
		<comments>http://www.scienco.org/2009/splitting-up-a-huge-file-on-one-line-with-sed/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 23:59:16 +0000</pubDate>
		<dc:creator>Mikkel Meyer Andersen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.scienco.org/?p=222</guid>
		<description><![CDATA[Sometimes when I export MySQL to files, I end up having one huge query on one line. It can be quite annoying! I&#8217;d rather want it on several lines; in that way it easier to just copy out a fragment of the query. And it also seems that some editors handle several lines better than [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when I export MySQL to files, I end up having one huge query on one line. It can be quite annoying! I&#8217;d rather want it on several lines; in that way it easier to just copy out a fragment of the query. And it also seems that some editors handle several lines better than one huge. Well, in this case my line looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>With this sed-command, every entry got its own line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sed</span> s<span style="color: #000000; font-weight: bold;">/</span>\<span style="color: #7a0874; font-weight: bold;">&#41;</span>,\<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>\<span style="color: #7a0874; font-weight: bold;">&#41;</span>,\\n\<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>g export.sql <span style="color: #000000; font-weight: bold;">&gt;</span> one-per-line.sql</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.scienco.org/2009/splitting-up-a-huge-file-on-one-line-with-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
