Last night I watched the movie Innocent by Simon Chung. These two reviews (1 & 2) give a much better description of the movie than I could do. The movie made a strange impact on me. The harsh environment of the main character is filmed extremely directly so the emotional impact of this movie is really strong, while at the same time this main character has a type of strong personality that really estranges him from me. Anyway, I’m not sure what to write about the movie, but I wanted to note it anyway.
April 29th, 2007
R already has a function called ls(), which simply lists the names of all objects in the current environment, and ls.str(), which does so with a lot more information. I wanted one that looks a little more similar to ls -l in a Unix environment, so here’s a start:
my.ls <- function(envir = as.environment(-1)) {
names <- .Internal(ls(envir, all.names=T))
for (item in names) {
l1 <- length(get(item))
l2 <- ""
if (!is.null(dim(get(item)))) {
l1 <- dim(get(item))[1]
l2 <- sprintf("%10d", dim(get(item))[2])
}
cat(sprintf("%-30s %-10s %-10s %10d %10sn",
item, class(get(item)), mode(get(item)), l1, l2))
}
}
April 29th, 2007