# equivalent to a data frame
hyperframe(X=1:10, Y=3)
# list of functions
hyperframe(f=list(sin, cos, tan))
# table of functions and matching expressions
hyperframe(f=list(sin, cos, tan),
e=list(expression(sin(x)), expression(cos(x)), expression(tan(x))))
hyperframe(X=1:10, Y=letters[1:10], Z=factor(letters[1:10]),
stringsAsFactors=FALSE)
lambda <- runif(4, min=50, max=100)
if(require(spatstat.random)) {
X <- solapply(as.list(lambda), rpoispp)
} else {
X <- solapply(as.list(lambda), function(lam) runifrect(rpois(1, lam)))
}
h <- hyperframe(lambda=lambda, X=X)
h
h$lambda2 <- lambda^2
h[, "lambda3"] <- lambda^3
h[, "Y"] <- X
h[[2, "lambda3"]]
Run the code above in your browser using DataLab