R/exportFct_addPlotLinks_2DTPP.R

Defines functions exportFct_addPlotLinks_2DTPP

exportFct_addPlotLinks_2DTPP <- function(wb, sheet, dat){
  ## Add column with links to fitted curve plots
  ## to do: combine this function with 'exportFct_addPlotLinks_1DTPP'
  allCols <- colnames(dat)
  ## Add column with links to fitted curve plots:
  linkCol <- grepl("plot_", allCols)
  if (any(linkCol)){
    invisible(sapply(colnames(dat)[which(linkCol)], function(pp){
      ind <- which(allCols == pp)
      class(dat[,pp]) <- 'hyperlink'
      suppressWarnings(writeData(wb, sheet=sheet, x=dat[,pp], startCol=ind, 
                                 startRow = 2, keepNA = FALSE))
    }))
  }
  return(wb)
}

Try the TPP package in your browser

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

TPP documentation built on Nov. 8, 2020, 5:55 p.m.