[R] dip test p-values for large sample sizes

2008-12-16 Thread Hufkens Koen
Hi list, I'm calculating dip statistics using the diptest package for large sample sizes. For everything under 5000 samples I can use the table qDiptab but over 5000 I have no reference. Is there any way to extend the table of hartigan's paper to larger sample sizes. Other solutions are also w

Re: [R] Find all numbers in a certain interval

2008-12-16 Thread David Winsemius
It's not entirely clear what you are asking for, since which(within.interval(a, -0.5, 0.5)) is actually longer than which(a > -0.5 & a < 0.5). You mention that you want a solution that applies to dataframes. Using indexing you can get entire rows of dataframes that satisfy multiple condit

Re: [R] Problem assigning "NA" as a level name in a list

2008-12-16 Thread Ben Bolker
Cliff Behrens-3 wrote: > > For future reference, am > I to assume that no contributed packages should be implicated in > resolving a problem? > > It does bring things one step closer to "minimal, reproducible". If you can identify the problem as specifically involving the package, then it

Re: [R] Problem assigning "NA" as a level name in a list

2008-12-16 Thread Cliff Behrens
Very good...thanks! As you can tell, I really haven't made much (READ any) previous use of this list. Cliff Ben Bolker wrote: Cliff Behrens-3 wrote: For future reference, am I to assume that no contributed packages should be implicated in resolving a problem? It does bring th

Re: [R] sliding window over a large vector

2008-12-16 Thread Gabor Grothendieck
There seems to be something wrong: > slide(c(1, 1, 0, 1), 2) [1] 2 2 but the output should be c(2, 1, 2) At any rate try this: library(zoo) 3 * rollmean(x, 3) On Mon, Dec 15, 2008 at 11:19 PM, Chris Oldmeadow wrote: > Hi all, > > I have a very large binary vector, I wish to calculate the num

Re: [R] sliding window over a large vector

2008-12-16 Thread Veslot Jacques
Hi, I just wrote a function quicker than slide() function with the same output, but I don't know what to do with this function! > sl <- function(x,z) c(0,cumsum(diff(x)[1:(length(x)-z-1)])) + > rep(sum(x[1:z]),length(x)-z) > sl(c(0,0,1,1,0,1,1,1,1,0,0,0,1,0,1,0,1,1,0,1,1,0,1,0),3) [1] 1 1 2

[R] Problem with alignDailySwries in R-metrics

2008-12-16 Thread John Kerpel
Hi Folks! I seem to be having a problem with alignDailySeries in Rmetrics: DTB6<-fredSeries("DTB6",frequency = "daily",from = "1980-01-01") trying URL ' http://research.stlouisfed.org/fred2/series/DTB6/downloaddata/DTB6.txt' Content type 'text/plain; charset=UTF-8' length 248392 bytes (242 Kb) op

[R] "Dotted lines at the end of the KM-curve"

2008-12-16 Thread Fredrik Lundgren
R-ers! Referees demand that the line in the KM-curve should be changed to dotted at the point where standarerror is <= 10 %. I don't think it's a good habit but I urgently need to implement such a thing in R with survfit, survplot or another program. They also want numbers at risk below the

<    1   2