R/getrowfolder.R

Defines functions getrow.folder

Documented in getrow.folder

getrow.folder <- function(object, name) {
  if (!is.folder(object))
    stop("getrow.folder applies to an object of class 'folder'.")
  
  xf <- list()
  for (k in 1:length(object)) {
    objk <- object[[k]]
    xf[[k]] <- objk[rownames(objk) %in% name, ]
  }
  
  attributes(xf) <- attributes(object)
  
  return(xf)
}

Try the dad package in your browser

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

dad documentation built on Aug. 9, 2021, 1:06 a.m.