Displaying 1 result from an estimated 1 matches for "namesf".
Did you mean:
names
2009 Apr 17
1
cast function in package reshape
...- function() {}
formals(f) <- as.pairlist(args)
body(f) <- parse(text = body)
namef <- paste("freq", as.character(nlev), sep = "_")
assign(namef, f)
res <- list(get(namef))
names(res) <- namef
}
if (nlev > 1) {
res <- NULL
namesf <- NULL
for (i in 1:nlev) {
body <- c("{", paste("sum(x[!is.na(x)] ==", as.character(lev[i]), ")",
sep = " "), "}")
f <- function() {}
formals(f) <- as.pairlist(args)
body(f) <- parse(text = body)
nam...