search for: q_round

Displaying 1 result from an estimated 1 matches for "q_round".

2011 Nov 18
1
R: writing data from one matrix into another with keeping NA's
...H OF THE QUINTILES q <- apply((!is.na(x_sorted)),1, sum) q_list[q_list==0] <- q q_list = q_list/5 ##Function to check wether q is full number check.integer <- function(N){ !length(grep("[^[:digit:]]", as.character(N))) } ##Round Quintiles to full integer q_round <- matrix(data = 0, nrow= nrow(q_list), ncol = ncol(q_list)) ##Aggregate all q_list in one matrix for (i in 1:nrow(q_round)) { if(check.integer(q_list[i]) == TRUE) q_round[i] = q_list[i] else q_round[i] = floor(q_list[i]) + 1 } ####################### ##Obtaining 1st Quintile from...