<?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>Archives LaTeX - Open Forecasting</title>
	<atom:link href="https://openforecast.org/tag/latex-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://openforecast.org/tag/latex-en/</link>
	<description>How to look into the future</description>
	<lastBuildDate>Fri, 14 Oct 2016 10:43:33 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2015/08/cropped-usd-05-32x32.png&amp;nocache=1</url>
	<title>Archives LaTeX - Open Forecasting</title>
	<link>https://openforecast.org/tag/latex-en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Exporting R tables in LaTeX</title>
		<link>https://openforecast.org/2016/10/12/exporting-r-table-in-latex/</link>
					<comments>https://openforecast.org/2016/10/12/exporting-r-table-in-latex/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Wed, 12 Oct 2016 12:07:18 +0000</pubDate>
				<category><![CDATA[R]]></category>
		<category><![CDATA[LaTeX]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=838</guid>

					<description><![CDATA[<p>Recently I have started using LaTeX for all my documents and presentations. Don&#8217;t ask me why, I just like how texts look there rather than in products of Microsoft (and I in general dislike MS&#8230; we have a long unpleasant history). So, I sometimes need to export tables from R into LaTeX. These tables can [&#8230;]</p>
<p>Message <a href="https://openforecast.org/2016/10/12/exporting-r-table-in-latex/">Exporting R tables in LaTeX</a> first appeared on <a href="https://openforecast.org">Open Forecasting</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently I have started using LaTeX for all my documents and presentations. Don&#8217;t ask me why, I just like how texts look there rather than in products of Microsoft (and I in general dislike MS&#8230; we have a long unpleasant history). So, I sometimes need to export tables from R into LaTeX. These tables can be huge, so exporting them manually is not an option. I know that there are R packages for this (probably, R has packages for everything in this world), however I prefer simpler methods. So what I usually do is just use <span class="lang:r decode:true  crayon-inline " >write.table()</span> function:</p>
<pre class="decode" >ourTable &lt;- matrix(c(1:3), 3, 3)
dimnames(ourTable) &lt;- list(paste0("Row",c(1:3)), paste0("Col",c(1:3)))

write.table(ourTable, "ourTable.txt", quote=FALSE, eol="\\\\\n", sep=" &amp; ")</pre>
<p>As a result that matrix is saved in &#8220;ourTable.txt&#8221; file:</p>
<pre class="lang:tex decode:true " >Col1 &amp; Col2 &amp; Col3\\
Row1 &amp; 1 &amp; 1 &amp; 1\\
Row2 &amp; 2 &amp; 2 &amp; 2\\
Row3 &amp; 3 &amp; 3 &amp; 3\\</pre>
<p>and it can be easily copy-pasted into desired LaTeX file. The only thing that needs to be done after that &#8211; is correction of column names with additional &#8220;&amp;&#8221; before &#8220;Col1&#8221;.</p>
<p>Message <a href="https://openforecast.org/2016/10/12/exporting-r-table-in-latex/">Exporting R tables in LaTeX</a> first appeared on <a href="https://openforecast.org">Open Forecasting</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2016/10/12/exporting-r-table-in-latex/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
