R/utils.R

Defines functions seval my.sort

my.sort <- function(x,index.return=FALSE,decreasing=FALSE) {
	if(decreasing) 
		x <- -x
	y <- sort(x, method="quick", index.return=index.return)
	if(decreasing) 
		y$x <- -y$x
	y
}


################################################################
###				step function                    			 ###
################################################################
## x		- x-Werte
## y		- y-Werte
## z		- neue x-Werte



seval <- function(x,y,z){
	n_x <- length(x)
	n_z <- length(z)
	xz_new <- rep(0,n_x) 
	ans <- .C(`C_step_eval_R`,
			  as.numeric(xz_new),
			  as.numeric(z), 
			  as.numeric(x), 
			  as.numeric(y), 
			  as.integer(n_z),
			  as.integer(n_x))
	#No longer needed since the symbol is registered in the NAMESPACE
	#          ,PACKAGE="survAUC")
	ans[[1]]
}

Try the survAUC package in your browser

Any scripts or data that you put into this service are public.

survAUC documentation built on March 31, 2023, 11:50 p.m.