Re: [R] How to use getSymbols() to get annual data

2017-09-01 Thread Bert Gunter
Reading ?getSymbols, why do think you can get yearly data if the src -- "yahoo" by default -- only contains daily data? And if you can get the daily data, why can't you just pick a day from each year to make it yearly? Note: I'm not a quantmod user, so apologies if I just don't get it. Cheers, Be

Re: [R] How to use getSymbols() to get annual data

2017-09-01 Thread Jeff Newmiller
I suppose that might depend what you mean by "annual data". ?yearlyReturn or ### library(quantmod) #> Loading required package: xts #> Loading required package: zoo #> #> Attaching package: 'zoo' #> The following objects are masked from 'package:base': #> #> as.Date, as.Date.numeric #> Load

Re: [R] correlation between nominal and ordinal

2017-09-01 Thread Mathew Guilfoyle
Any of the usual rank correlation methods should be fine if you're expecting a monotonic relationship e.g. Spearman's rho or Kendall's tau. > On 1 Sep 2017, at 21:25, merlinverde...@infomed.sld.cu wrote: > > I would be very grateful if you would tell me how I can find the degree of > correlatio

[R] How to use getSymbols() to get annual data

2017-09-01 Thread Yingrui Liu
Dear Sir/Madam, How to use getSymbols() to get annual data? For example, I need the annual stock price of APPLE from the year 2000 to 2016. How to write the command? I only know how to get the daily data. It is: getSymbols("AAPL",from="2000-01-01",to="2016-12-31") Thank you very much. Hav

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Achim Zeileis
On Fri, 1 Sep 2017, Andrea Altomani wrote: I should have formulated my question in a more specific way. 1. I suspect this is a floating point precision issue. I am not very knowledgeable about R internals, can someone else confirm it? Yes. If you represent a series with increment 1/12 it dep

Re: [R] correlation between nominal and ordinal

2017-09-01 Thread Bert Gunter
Wrong list. This list is about programming in R, not statistics. Try stats.stackexchange.com instead for statistics questions. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloo

Re: [R] How does pbtree (from the phytools package) work?

2017-09-01 Thread ruipbarradas
Hello, The best way for you to know that is to read the package's documentation. https://cran.r-project.org/web/packages/phytools/index.html I suggest the refference manual phytools.pdf Hope this helps, Rui Barradas Citando Tauras Vilgalys : Hi, I'm interested in using pbtree (package ph

[R] correlation between nominal and ordinal

2017-09-01 Thread merlinverdecia
I would be very grateful if you would tell me how I can find the degree of correlation between a nominal dependent variable and an independent ordinal variable. The nominal variable has only two levels: YES and NO. thank you very much in advance regards, merlin -

[R] How does pbtree (from the phytools package) work?

2017-09-01 Thread Tauras Vilgalys
Hi, I'm interested in using pbtree (package phytools) to simulate a phylogeny, but would first like to understand how the simulation works (i.e. when does a split occur and how is the split chosen?). Can anyone point me to the model that is used? Thank you! [[alternative HTML version dele

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Andrea Altomani
I should have formulated my question in a more specific way. 1. I suspect this is a floating point precision issue. I am not very knowledgeable about R internals, can someone else confirm it? 2. Should this be considered a bug or not, because it is "just a precision issue"? Should I report it? 3

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Jeff Newmiller
You already know the answer. Why ask? -- Sent from my phone. Please excuse my brevity. On September 1, 2017 7:23:24 AM PDT, Andrea Altomani wrote: >I have a time series x, and two other series obtained from it: > >x <- structure(2017, .Tsp = c(2017.417, 2017.417, 12), >class =

[R] Precision error in time index of ts objects

2017-09-01 Thread Andrea Altomani
I have a time series x, and two other series obtained from it: x <- structure(2017, .Tsp = c(2017.417, 2017.417, 12), class = "ts") y <- floor(x) z <- x-y I would expect the three series to have exactly the same index. However I get the following > time(x)-time(y) Jun 2017