Displaying 1 result from an estimated 1 matches for "trg_type".
Did you mean:
arg_type
2012 Aug 22
1
Reshaping dataframes
...ackage for learning a Bayesian Network which won't accept NA as a
value. From a database I query data.frames with k,k+n,k+2n, ... variables
(there are always at least k variables as leftmost columns). Using
rbind.fill from the reshape package on two data frames I would get a data
frame like
trg_type child_type_1
1 Scientists NA
2 of used
Now to get rid of NA values I use the following function, which works for
data frames with only factor values:
substitute_na <- function(tok, na_factor_level = "NOT_REALIZED") {
for (i in 1:length(tok)) {levels(tok[,i]) <...