R/addNamesToList.R

Defines functions addNamesToList

addNamesToList=function(matList,speciesNames,stageNames,numSpecies){

  newList=list()
  for (i in seq(1,numSpecies)){
    mat=as.matrix(matList[[i]])
    rownames(mat)=stageNames[[i]]
    newList=c(newList,list(mat))
  }
  names(newList)=speciesNames
  return(newList)
  
}

Try the stagePop package in your browser

Any scripts or data that you put into this service are public.

stagePop documentation built on May 10, 2022, 5:10 p.m.