r apply

  1. J

    Apply function in R

    Hi, I want to apply a user defined function over a matrix object. I don't have desired results my input is a 4x4 matrix and I want to get as output a 4x4 matrix with the transformation defined in mapfun function Where is my error? Thanks in advance --- mapfun <- function(val){ if...