Re: [R] tidyquant error downloading symbols for Index

2017-08-06 Thread David Winsemius
> On Aug 6, 2017, at 5:10 PM, Sparks, John James wrote: > > Hi R Helpers, > > I recently tried to take advantage of the ability to download all the > tickers in the S 500 using the functionality of tidyquant, but it threw > an error. > > For summary, the set of commands that

[R] tidyquant error downloading symbols for Index

2017-08-06 Thread Sparks, John James
Hi R Helpers, I recently tried to take advantage of the ability to download all the tickers in the S 500 using the functionality of tidyquant, but it threw an error. For summary, the set of commands that I ran was library(tidyquant) tq_index_options() tq_index("SP500") sessionInfo() R

Re: [R] Nested for loop

2017-08-06 Thread Kirsten Morehouse
Hi Ben, That's exactly right! Except for each set it's the sample population that is 400, 800 or 300. I want to take 3 samples, each of 100, where only the population differs. I can do this separately, but I'm having trouble putting them all on the same graph. I'd like to have sample on the x

Re: [R] Nested for loop

2017-08-06 Thread Ben Tupper
Hi Kirsten, I can run your example code but I can't quite follow your division of sampling. Can you restate the the task? Below is what I think you are asking for, but I have the feeling I may be off the mark. Set A: 400 samples, draw 100 in range of 5 to 15 Set B: 800 samples, draw 100 in

Re: [R] Crash when installing heavy packages in remote server with R and Rstudio server

2017-08-06 Thread Duncan Murdoch
On 06/08/2017 2:57 PM, Duncan Murdoch wrote: On 06/08/2017 9:17 AM, Jorge Cimentada wrote: Hi, I've been trying to install some very heavy packages from Github (~ 100MB - 300 MB) on my remote server using Rstudio server and I keep getting some crashes. These packages are pretty much datasets.

Re: [R] Crash when installing heavy packages in remote server with R and Rstudio server

2017-08-06 Thread Duncan Murdoch
On 06/08/2017 9:17 AM, Jorge Cimentada wrote: Hi, I've been trying to install some very heavy packages from Github (~ 100MB - 300 MB) on my remote server using Rstudio server and I keep getting some crashes. These packages are pretty much datasets. Based on your description, this is RStudio

Re: [R] data frame question

2017-08-06 Thread Andras Farkas via R-help
thank you both... assumption is in fact that a and b are always the same length... these work for me well... much appreciate it... Andras On Sunday, August 6, 2017 12:14 PM, Ulrik Stervbo wrote: Hi Andreas, assuming that the increment is always indicated by the

[R] Help with optim function in R, please?

2017-08-06 Thread fadeh Alanazi
Hi all, Many thank in advance for helping me.  I tried to fit Expectation Maximization algorithm for mixture data. I must used one of numerical method to maximize my function. I built my code but I do not know how to make the optim function run over a different value of the parameters. 

Re: [R] data frame question

2017-08-06 Thread Ulrik Stervbo
Hi Andreas, assuming that the increment is always indicated by the same value (in your example 0), this could work: df$a <- cumsum(seq_along(df$b) %in% which(df$b == 0)) df HTH, Ulrik On Sun, 6 Aug 2017 at 18:06 Bert Gunter wrote: > Your specification is a bit unclear

Re: [R] data frame question

2017-08-06 Thread Bert Gunter
Your specification is a bit unclear to me, so I'm not sure the below is really what you want. For example, your example seems to imply that a and b must be of the same length, but I do not see that your description requires this. So the following may not be what you want exactly, but one way to do

[R] Crash when installing heavy packages in remote server with R and Rstudio server

2017-08-06 Thread Jorge Cimentada
Hi, I've been trying to install some very heavy packages from Github (~ 100MB - 300 MB) on my remote server using Rstudio server and I keep getting some crashes. These packages are pretty much datasets. I try doing it with this code and get the error below. > install.packages("devtools") >

[R] data frame question

2017-08-06 Thread Andras Farkas via R-help
Dear All, wonder if you have thoughts on the following: let us say we have: df<-data.frame(a=c(1,2,3,4,5,1,2,3,4,5,6,7,8),b=c(0,1,2,3,4,0,1,2,3,4,5,6,7)) I would like to rewrite values in column name "a" based on values in column name "b", where based on a certain value of column "b" the

Re: [R] SPSS R Factor v2.4.2

2017-08-06 Thread Uwe Ligges
Actually there is also a Windows binary: https://cran.r-project.org/bin/windows/contrib/3.2/polycor_0.7-8.zip hence installing with install.packages("polycor") should work *if* you choose a http (not https) mirror. The latter was not possible in R-3.2.0 which probably is what you are taking