Note that there are some explanatory texts on larger screens.

plurals
  1. POcollection answers by inserting them into a dataframe or vector
    primarykey
    data
    text
    <p>I am wondering if it is possible to groupe a bunch of different calculation answers into a vector? I have 30 calculations (I displayed the answer of the first 3 here), and than I would like to groupe them all inside a vector or even data frame so the stock name stays. The goal being to sort them by descending price</p> <pre><code> AXP.Close 2002-06-20 0.008553863 </code></pre> <p>2nd answer I would like to insert inside the vector or even data frame</p> <pre><code> BA.Close 2002-06-20 0.01553576 </code></pre> <p>3rd answer I would like to insirt inside the vector or even data frame</p> <pre><code> DIS.Close 2002-06-20 0.01073620 </code></pre> <p>More details</p> <p>thank you both of you for your answers, you're right I should give some more details:</p> <p>So basicly I am trying to calculate and sort descending the yield of the 30 stocks in the Dow jones Index, I can't use the yahooQF("Dividend Yield") because it doesn't have the option to choose the yield in 2002 for example</p> <pre><code>x = c("AAPL","ADBE","ADP") Yield&lt;-getQuote(x, what = yahooQF("Dividend Yield")) </code></pre> <p>So I tried to get it otherwise by getting separately the dividend over a year time span and the price at the end of the period to than do a division</p> <pre><code>s = c("VOD","ADP", etc) getSymbols(s, from="2009-06-20", to="2009-06-22") ClosePrices &lt;- do.call(merge, lapply(s, function(x) Cl(get(x)))) sum(getDividends("ADP",from = "2008-06-29", to="2009-06-20")) /ClosePrices[,1] </code></pre> <p>And now the objective would be to put them all the calculated yields in a vector (the name of the stock should stay) and order them descending wise! Thanks a lot for the help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload