Re: [R] Limit in Directory Hierarchy?

2018-03-25 Thread Jeff Newmiller
This is the wrong place to ask what RStudio can or cannot do. However, if your question is about R you should try invoking your reproducible example in RGui or the command line R.exe before posting here. R has no directory depth limit. There is an operating system limit on returning paths

Re: [R] Take average of previous weeks

2018-03-25 Thread Bert Gunter
I am sure that this sort of thing has been asked and answered before, so in case my suggestions don't work for you, just search the archives a bit more. I am also sure that it can be handled directly by numerous functions in numerous packages, e.g. via time series methods or by calculating running

[R] Limit in Directory Hierarchy?

2018-03-25 Thread WRAY NICHOLAS via R-help
A quick question - is there a limit to the number of levels one can go down when setting the directory in R studio? I ask because I have been trying to set the directory to a folder 8 levels down which R studio won't allow, and when I try to set the directory through Session/Set Working

Re: [R] Medical risk package calculation RSI

2018-03-25 Thread David Winsemius
> On Mar 25, 2018, at 7:53 AM, Ramesh YAPALPARVI > wrote: > > Hi all, > > > > I'm using the medical risk package to determine the risk stratification Index > based on the ICD9 codes. Although, I have been successful in using it, I'm > unable to interpret the

[R] Medical risk package calculation RSI

2018-03-25 Thread Ramesh YAPALPARVI
Hi all, I'm using the medical risk package to determine the risk stratification Index based on the ICD9 codes. Although, I have been successful in using it, I'm unable to interpret the output. here is the sample code # Calculate RSI for each patient ("id") in dataframe cases <-

Re: [R] Take average of previous weeks

2018-03-25 Thread Gabor Grothendieck
There is no `value` column in the `dput` output shown in the question so using `tmin` instead note that the `width=` argument of `rollapply` can be a list containing a vector of offsets (-1 is prior value, -2 is value before that, etc.) and that we can use `rollapplyr` with an `r` on the end to

[R] Take average of previous weeks

2018-03-25 Thread Miluji Sb
Dear all, I have weekly data by city (variable citycode). I would like to take the average of the previous two, three, four weeks (without the current week) of the variable called value. This is what I have tried to compute the average of the two previous weeks; df = df %>% mutate(value.lag1

Re: [R] Get Specific Records from Another DataFrame

2018-03-25 Thread Jeff Newmiller
I suggest that you read the vignette for the data table package. That package uses some odd syntax compared to base R but has some features designed especially for these kinds of problems. -- Sent from my phone. Please excuse my brevity. On March 24, 2018 5:03:44 PM PDT, M Can