Tag: sapply

  • Getting names while applying sapply or l …

    Sambava Getting names while applying sapply or lapply in R. sapply or lapply extract the element without the row name. So this code does not work. par(mfrow = c(4,4)) sapply(names(score.avg) , function(x) { plot(x , type = ‘l’ ); title(main=names(x)) }) In order to use the row names while applying sapply or apply, pass the names…