search for: tp3450862p3452417

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

2011 Apr 14
1
modify particular factor levels
Dear list, I wish to modify programmatically only a few factor levels, according to a named list. I came up with this function, modify.levels <- function(f, modify=list()){ ## levels that will not be changed names.old.levels <- setdiff(levels(f), unlist(modify)) ## as a named list old.levels <- as.pairlist(names.old.levels) names(old.levels) <- names.old.levels ## union