# NOT RUN {
# hash some complicated R object (not a list).
m <- lm(height ~ weight, data=women)
hash(m)
# hash a character vector element by element:
x <- c("Call any vegetable"
, "and the chances are good"
, "that the vegetable will respond to you")
hash(x)
# hash a character vector as one object:
hash(x, recursive=FALSE)
# hash a list recursively
L <- strsplit(x," ")
hash(L)
# recursive really means recursive, so nested lists are recursed over:
L <- list(
x = 10
, y = list(
foo = "bob"
, bar = lm(Sepal.Width ~ Sepal.Length, data=iris)
)
)
hash(L)
hash(L,recursive=FALSE)
# }
Run the code above in your browser using DataLab