Re: [R] Fleming-Harrington weighted log rank test

2018-02-14 Thread David Winsemius
> On Feb 14, 2018, at 5:26 PM, David Winsemius wrote: > >> >> On Feb 13, 2018, at 4:02 PM, array chip via R-help >> wrote: >> >> Hi all, >> >> The survdiff() from survival package has an argument "rho" that implements >> Fleming-Harrington weighted long rank test. >> >> But according to

Re: [R] Fleming-Harrington weighted log rank test

2018-02-14 Thread David Winsemius
> On Feb 13, 2018, at 4:02 PM, array chip via R-help > wrote: > > Hi all, > > The survdiff() from survival package has an argument "rho" that implements > Fleming-Harrington weighted long rank test. > > But according to several sources including "survminer" package > (https://cran.r-proje

Re: [R] using cat to log to file with sapply

2018-02-14 Thread Bert Gunter
Not sure what you wanted to do.Note that you have "test'txt" and "log.txt" in your code. Using only "test.txt", the following worked fine for me: letters[1:5]->x logf<-"test.txt" cat('%%\n',file=logf) catf<-function(x,...,logfile='test.txt', append=TRUE){ cat(x,'\n', file=

Re: [R] using cat to log to file with sapply

2018-02-14 Thread Jeff Newmiller
Your call to catf in testit is after the return, so it is never called. FWIW my antibugging strategy (and readability strategy) is to never use the return function... I structure my logic to end up at the end with my desired function result in a variable and I simply put that variable on the l

Re: [R] using cat to log to file with sapply

2018-02-14 Thread William Dunlap via R-help
testit<-function(x,...){ paste0('this is x: ',x)->y return(y) catf("++test=",...) } You return from the function before calling catf(). Remove the 'return(y)' and make 'y' the last expression in the function. Bill Dunlap TIBCO Software wdunlap tibco.com On We

[R] using cat to log to file with sapply

2018-02-14 Thread Alexander.Herr
Hi List, I am trying to write unsuccessfully to a logfile with cat. Here my example code: letters[1:5]->x logf<-"test.txt" cat('%%\n',file=logf) catf<-function(x,...,logfile='log.txt', append=TRUE){ cat(x,'\n', file=logfile, append=append)} testit<-function(x,...){ paste

Re: [R] Parallel assignments and goto

2018-02-14 Thread Fox, John
Dear Thomas, This looks like a really interesting project, and I don't think that anyone responded to your message, though I may be mistaken. I took at a look at implementing parallel assignment, and came up with: passign <- function(..., envir=parent.frame()){ exprs <- list(...) vars <

Re: [R] help with the plot overlay

2018-02-14 Thread Fix Ace via R-help
Hi, JIm, Thank you so much! Such a convenient tool! A. On Sunday, February 4, 2018 9:59 PM, Jim Lemon wrote: Hi Ace, You can do it with plotrix: library(plotrix) barpos<-barp(c(1,5,38),width=0.5,col=c("white","lightgray","darkgray"),ylim=c(0,70)) ehplot(c(1,0.8,0.9,0.8,1.1,1,4,3,5,14,3,

Re: [R] long vectors not supported yet

2018-02-14 Thread Jeff Newmiller
This looks to me like a package development issue... which may be under discussion in R-sig-geo (search the archives), but more likely to be appropriate to discuss with the maintainer by email or through their development repository (R-forge, though it looks unused). -- Sent from my phone. Plea

[R] long vectors not supported yet

2018-02-14 Thread Loris Bennett
Hi, I am running R 3.3.3 and getting the following error: Error in add_edges(res, edges = t(as.matrix(el[, 1:2])), attr = weight) : long vectors not supported yet: ../../src/include/Rinlinedfuns.h:138 when passing a 13 GB TransitionLayer object to shortestPath from the package 'gdistance'

Re: [R] How to turn off warnings about class name conflicts

2018-02-14 Thread Ayhan yuksel
Thanks Daniel for your reply However I get these warnings even I start with a fresh R session and remove all objects (including hidden ones) before executing the mentioned codes I also tried reinstalling these libraries including zoo and xts libraries, but the problem continues I guess this is a

[R] Unexpected behaviour in rms::lrtest

2018-02-14 Thread Kevin E. Thorpe
Hello. One of my teaching assistants was experimenting and encountered unexpected behaviour with the lrtest function in the rms package. It appears that when you have a pair of non-nested models that employ an RCS, the error checking for non-nested models appears not to work. Here is a repro

Re: [R] How to turn off warnings about class name conflicts

2018-02-14 Thread Daniel Nordlund
On 2/13/2018 11:47 PM, Ayhan yuksel wrote: Hi, I am using two packages (quantmod and FRAPO) Quantmod and FRAPO both have a class names "zoo" R is displaying the following warning when I manipulate an object of class zoo: Found more than one class "zoo" in cache; using the first, from namespac

[R] How to turn off warnings about class name conflicts

2018-02-14 Thread Ayhan yuksel
Hi, I am using two packages (quantmod and FRAPO) Quantmod and FRAPO both have a class names "zoo" R is displaying the following warning when I manipulate an object of class zoo: Found more than one class "zoo" in cache; using the first, from namespace 'quantmod' Also defined by ‘FRAPO’ The war