search for: elbat

Displaying 2 results from an estimated 2 matches for "elbat".

Did you mean: elbaz
2009 Nov 22
3
Define return values of a function
...k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9, 1))) mytable <- function(x){ xtb <- x btx <- x # do more with x, not relevant here cat("The table has been created, see here:\n") print(xtb) list(table=xtb, elbat=btx) } tbl <- table(i, k) mytable(tbl) # (1) z <- mytable(tbl) # (2) str(z) # (3) (1) Wanted: outputs the string and the table properly. *Unwanted*: outputs the list elements. (2) and (3) Wanted: outputs the string properly. Wanted: assigns the list properly. How can I get rid of the *...
2009 Nov 23
0
R-help Digest, Vol 81, Issue 23
..."Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9, > 1))) > mytable <- function(x){ > xtb <- x > btx <- x > # do more with x, not relevant here > cat("The table has been created, see here:\n") > print(xtb) > list(table=xtb, elbat=btx) > } > tbl <- table(i, k) > mytable(tbl) # (1) > z <- mytable(tbl) # (2) > str(z) # (3) > > (1) Wanted: outputs the string and the table properly. *Unwanted*: > outputs the list elements. > > (2) and (3) Wanted: outputs the string properly. Wanted: assigns...