www-ai.cs.tu-dortmund.de/de/LEHRE/VORLESUNGEN/NOPT/SS14/code/util.html
a single column in R) for the given list l. # Ex. x = vec(c(1.2, 2.4)) vec <- function(l) { len = length(l); v <- matrix(l, nrow=len, ncol=1); return(v) } # Create a matrix for the given list l with the [...] the given number of rows(r) and column(r) # Ex. x = mat(c(1,2,3,4), 2, 2) mat <- function(l, r, c, byrow=TRUE) { len = length(l); if(!(len = r*c)) { print("Error in mat(): length of l must be r x c") return …