to.hourly adding open and close columns
<p>I have a <code>data.frame</code> object containing OHLC data:</p>

<pre><code>head(data,3)
Timestamp           Open   High   Low    Close   Vol
2016-02-05 13:45:00 1161.9 1162.4 1161.7 1161.8  592
2016-02-05 13:50:00 1161.8 1163.2 1161.7 1162.5  643
2016-02-05 13:55:00 1162.5 1164.7 1162.1 1164.5 1072
</code></pre>

<p>I then create another data.frame extracting the High and Low cols:</p>

<pre><code>x &lt;- data[,c("High","Low")]
</code></pre>

<p>Which gives:</p>

<pre><code>head(x,3)
Timestamp           High   Low
2016-02-05 13:45:00 1162.4 1161.7
2016-02-05 13:50:00 1163.2 1161.7
2016-02-05 13:55:00 1164.7 1162.1
</code></pre>

<p>And then convert to hourly:</p>

<pre><code>x &lt;- xts::to.hourly(x, indexAt='startof')  
</code></pre>

<p>Which somehow adds back on the "Open" and "Close" columns even though they did not exist in "x":</p>

<pre><code>head(x,3)
Timestamp           x.Open x.High x.Low   x.Close
2016-02-05 13:45:00 1162.4 1164.7 1162.4  1164.7
2016-02-05 14:00:00 1167.2 1176.7 1167.1  1176.7
2016-02-05 15:00:00 1176.3 1176.3 1174.9  1176.2
</code></pre>

<p>The values in the Open and Close columns are as if they came from <code>data</code> rather than <code>x</code>, but how did it get these values when I did not pass <code>data</code> into that function?</p>

<p>Obviously there is an easy work around here which is to remove (again) the Open and Close columns post the <code>to.hourly</code> function, but is this expected behavior, or am I missing something really simple?</p>