Re: [R] Help with transpose please.

2018-06-22 Thread Ramesh YAPALPARVI
Please check out tidyr package and use commands like spread/ gather which would make data wide or long > On Jun 22, 2018, at 07:43, Bill Poling wrote: > > Good morning. > > > I have data in the form: > > head(Edit041IA, n=25) > ClaimServiceID ClaimID DiagnosisCode > 1 183056004 78

[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 <- data.f

[R] Help with SQLsave

2018-01-24 Thread Ramesh YAPALPARVI
Hi all, I'm using RODBC library to connect to a database. I'm trying to read a table from a database and after manipulating it would like to write to the same database but with a different table P<-data.frame(sqlQuery(myconn,'select  *  from Demographics')) sqlSave(myconn,p,tablename="tria

[R] Help with dates

2017-12-28 Thread Ramesh YAPALPARVI
Hi all, I’m struggling to get the dates in proper format. I have dates as factors and is in the form 02/27/34( 34 means 1934). If I use as.Date with format %d%m%y it gets converted to 2034-02-27. I tried changing the origin in the as.Date command but nothing worked. Any help is appreciated. Tha