Re: [R] Survival Analysis and Predict time-to-death

2015-08-18 Thread David Winsemius
It depends on several factors. You need answers to all these questions: How many events occurred, ... and was the period of observation long enough to cover a significant fraction of the life expectancy, …. and is there external evidence or theory that will help establish that this process shou

Re: [R] Survival Analysis and Predict time-to-death

2015-08-18 Thread Göran Broström
On 2015-08-18 01:44, David Winsemius wrote: On Aug 17, 2015, at 1:51 PM, David Winsemius wrote: On Aug 17, 2015, at 12:10 PM, survivalUser wrote: Dear All, I would like to build a model, based on survival analysis on some data, that is able to predict the /*expected time until death*/ fo

[R] Unable to get the 64-bit version of R (3.2.1 Terminal or GUI) to start on a Windows 7 machine

2015-08-18 Thread brian
I am unable to get the 64-bit version of R (3.2.1 Terminal or GUI) to start on a Windows 7 machine. I can get the 32-bit to start, just not the 64-bit. I am receiving a dialog box box that points me to four files but nothing seems usable when examining them. Installed to C:\Dev\R\R-3.2.1. I hav

Re: [R] data frame formatting

2015-08-18 Thread boB Rudis
Here's one way in base R: df <- data.frame(id=c("A","A","B","B"), first=c("BX",NA,NA,"LF"), second=c(NA,"TD","BZ",NA), third=c(NA,NA,"RB","BT"), fourth=c("LG","QR",NA,NA)) new_df <- data.frame(do.call(rbind, by(df, df$id, functi

[R] data frame formatting

2015-08-18 Thread Jon BR
Hello all, I would like to take a data frame such as the following one: > df <- data.frame(id=c("A","A","B","B"),first=c("BX",NA,NA,"LF"),second=c(NA,"TD","BZ",NA),third=c(NA,NA,"RB","BT"),fourth=c("LG","QR",NA,NA)) > df id first second third fourth 1 ABX LG 2 A TD

Re: [R] How are packages installed with install_github() updated in RStudio?

2015-08-18 Thread Duncan Murdoch
On 18/08/2015 10:01 AM, Hadley Wickham wrote: > RStudio just calls the same underlying R functions, so it doesn't make > any difference that you're using RStudio. Currently, there's no > automatic way to update packages installed from github. And to clarify a bit more: this means if you install

Re: [R] How are packages installed with install_github() updated in RStudio?

2015-08-18 Thread John Kane
Thanks Hadley I had some vague impression that RStudio was maintaining a slightly diffferent repository thought I am not sure why I thought that. John Kane Kingston ON Canada > -Original Message- > From: h.wick...@gmail.com > Sent: Tue, 18 Aug 2015 09:01:09 -0500 > To: jrkrid...@inbox.

Re: [R] Output In R

2015-08-18 Thread Greg Snow
I would suggest that instead of trying to view all the results in the console that you save the result into a object then use the View (note the capitol V) function to be able to scroll through the results. The head and tail functions have already been mentioned and I second their use for a quick

Re: [R] Non linear regression - Von Bertalanffy Growth Function - "singular gradient matrix at initial parameter estimates"

2015-08-18 Thread Bert Gunter
These appear to be primarily statistics/nonlinear optimization issues that are off topic here, which is about R programming. Post on a statistics list like stats.stackexchange.com instead. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certa

Re: [R] Running R in Server

2015-08-18 Thread arnaud gaboury
On Sun, Aug 16, 2015, 2:29 PM Swagato Chatterjee wrote: Hello, I have written a R script which runs a regression of a dataset and saves the result in a csv file. Now this dataset has to be edited periodically which is done in a server. I need to run the R script in a server so that the results

[R] Non linear regression - Von Bertalanffy Growth Function - "singular gradient matrix at initial parameter estimates"

2015-08-18 Thread Xochitl CORMON
Dear all, I am trying to estimate VBGF parameters K and Linf using non linear regression and nls(). First I used a classic approach where I estimate both parameters together as below with "alkdyr" being a subset per year of my age-length-key database and running in a loop. vbgf.par <- nls(Lg

Re: [R] Output In R

2015-08-18 Thread Scott Tetrick
?write.csv and look at with the editor of choice. On Tue, Aug 18, 2015 at 6:41 AM, Shivi82 wrote: > Hello All, > > As i am a newbie in R so most of you would have seen this question zillion > times. I searched for the answer on this forum as well on other various > forums however could not fi

Re: [R] Output In R

2015-08-18 Thread Loris Bennett
Shivi82 writes: > Hello All, > > As i am a newbie in R so most of you would have seen this question zillion > times. I searched for the answer on this forum as well on other various > forums however could not find the answer i am looking for. > > I am dplyr package and used a very basic code:

Re: [R] Output In R

2015-08-18 Thread Boris Steipe
That's a very odd request: surely you would not want to visually inspect 3 million rows in the console? Typically one would assign the (large) results of a function to a variable for further processing. If you need to inspect the beginning and end of your dataset, use head() and tail(). Try ge

[R] Output In R

2015-08-18 Thread Shivi82
Hello All, As i am a newbie in R so most of you would have seen this question zillion times. I searched for the answer on this forum as well on other various forums however could not find the answer i am looking for. I am dplyr package and used a very basic code: select(june,city,state,mod)

Re: [R] date format in xyplot

2015-08-18 Thread Duncan Mackay
Hi I forgot to change the format and put the panel back in - I was trying to get the data right see ? strptime for a list of all the combinations for dates. Have a look at http://lmdvr.r-forge.r-project.org/figures/figures.html which may give you some ideas. If you want to restrict data to a

[R] NB-L Regression

2015-08-18 Thread Serpil Aktaş Altunay
Hi All, I am trying to run "Negative Binomial Lindley" regression under glm. But NB-L is not defined in the family group. I will perform a simulation. The model has only one covariate generated from uniform distribution, the count response variable follows the NB distribution. the model should be

Re: [R] Running R in Server

2015-08-18 Thread Loris Bennett
Swagato Chatterjee writes: > Hello, > > I have written a R script which runs a regression of a dataset and saves > the result in a csv file. > > Now this dataset has to be edited periodically which is done in a server. I > need to run the R script in a server so that the results can also be share

Re: [R] date format in xyplot

2015-08-18 Thread Christine Lee via R-help
Thank you Duncan, I have tried the scales function. It ends up with 2015-09-15, which is acceptable. It is far much better than "09 15" shown on the axis. The problem is the data were obtained in different years. This makes "2015" shown in lattice plots of different years. I have tried to p

Re: [R] Running R in Server

2015-08-18 Thread John McKown
On Sun, Aug 16, 2015 at 3:27 AM, Swagato Chatterjee wrote: > Hello, > > I have written a R script which runs a regression of a dataset and saves > the result in a csv file. > > Now this dataset has to be edited periodically which is done in a server. I > need to run the R script in a server so th

Re: [R] How are packages installed with install_github() updated in RStudio?

2015-08-18 Thread Hadley Wickham
RStudio just calls the same underlying R functions, so it doesn't make any difference that you're using RStudio. Currently, there's no automatic way to update packages installed from github. Hadley On Tue, Aug 18, 2015 at 8:14 AM, John Kane wrote: > Hi Michal, > > Because RStudio seems to use i

Re: [R] Running R in Server

2015-08-18 Thread Bos, Roger
There is probably nothing that can give you a step by step guide. You are touching on a couple of different subjects. If you just want to run code automatically on a windows server you can use task scheduler to call Rscript filename.R. If you want to create Web application, that's a bit harde

Re: [R] Survival analysis and predict time-to-death

2015-08-18 Thread Therneau, Terry M., Ph.D.
I read this list a day late as a digest so my answers are rarely the first. (Which is nice as David W answers most of the survival questions for me!) What you are asking is reasonable, and in fact is common practice in the realm of industrial reliability, e.g., Meeker and Escobar, Statistical

Re: [R] How are packages installed with install_github() updated in RStudio?

2015-08-18 Thread John Kane
Hi Michal, Because RStudio seems to use its own method of updating you might be better off asking in their forum. John Kane Kingston ON Canada > -Original Message- > From: prgo...@gmail.com > Sent: Tue, 18 Aug 2015 10:43:20 +0200 > To: r-help@r-project.org > Subject: [R] How are packa

Re: [R] date format in xyplot

2015-08-18 Thread John Kane
Sorry, quick follow-up: is there any chance you used Date rather than Date1 in the original plot? John Kane Kingston ON Canada > -Original Message- > From: r-help@r-project.org > Sent: Mon, 17 Aug 2015 21:15:39 -0700 > To: r-help@r-project.org > Subject: [R] date format in xyplot > > T

Re: [R] date format in xyplot

2015-08-18 Thread John Kane
Hi Christine, I am afraid I cannot help as it 'appears' fine here I get an x-axis witih Oct 01 Oct 15 Nov 15 Dec 01 I don't normally use lattice but the dates seem reasonable to me Do a str(Raw) and check if Date1 is actually a date in your orginal data. It is one here but who knows with R :)

Re: [R] Please Help how to execute R via php script

2015-08-18 Thread Loris Bennett
Joseph Mbowe writes: > Dear R members, I want to call my R script thorough php but no I am not > getting output > When I call my r script by bat file works fines also when run by Rstudio it > works fines > but when i cant call via php > here is the php code: > exec('C:/"Program Files"/R/R-3.2.0/

[R] Please Help how to execute R via php script

2015-08-18 Thread Joseph Mbowe
Dear R members, I want to call my R script thorough php but no I am not getting output When I call my r script by bat file works fines also when run by Rstudio it works fines but when i cant call via php here is the php code: ' ; ?> here is R script args=(commandArgs(TRUE)) library(ggplot2) l

[R] R: forecasting a binary time series using the VLMC package

2015-08-18 Thread Gauthier Pierard
I would like to ask some clarifications on the method: predict.vlmc My problem is to forecast a binary time series one period ahead. I have a time series bin2 of length 2000. When using m2<-vlmc(bin2) fc2<-predict(m2) 1. fc2[i] is a prediction for i, not for i+1, is that correct? I am aw

[R] How are packages installed with install_github() updated in RStudio?

2015-08-18 Thread Michal Kvasnička
Hallo. I use RStudio. Because of a bug in the latest CRAN version of dplyr, I installed the GitHub version with install_github(). Now I wonder what happens when there is a new version. Does RStudio update the packages installed from GitHub? If so, does it replace it with the new CRAN version, or a

Re: [R] date format in xyplot

2015-08-18 Thread Duncan Mackay
Hi Christine If somethings go wrong: 1 first check your data str(Raw) 'data.frame': 10 obs. of 5 variables: $ Date : Factor w/ 16 levels "1/10","1/11",..: 6 7 2 4 12 9 7 2 4 12 $ Year : int 2002 2002 2002 2002 2002 2002 2002 2002 2002 2002 $ Station: Factor w/ 4 levels "E","F","H","I":

Re: [R] 回覆︰ [FORGED] date format in xyplot

2015-08-18 Thread Rolf Turner
On 18/08/15 18:15, Christine Lee wrote: Thanks Mr. Turner, Please!!! Either "Rolf" or (if you insist on formality) *Dr.* Turner. :-) This puzzles me. Why do we come out with different axis labels with the same command? Is this because of my R version or my computer? It is most likely