R/ls_tsv_rows.R

Defines functions ls_tsv_rows

Documented in ls_tsv_rows

#' Display one or more rows from a LimeSurvey dataframe, omitting empty columns
#'
#' @param dfRows A dataframe with the selected rows.
#'
#' @return The rows, with empty columns omitted.
#'
#' @examples ### Add later.
#' @export
ls_tsv_rows <- function(dfRows) {
  return(dfRows[,
                unlist(
                  lapply(
                    dfRows,
                    function(x)
                      return(!all(is.na(x) | (nchar(as.character(x)) == 0)))
                  ))]);
}

Try the limonaid package in your browser

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

limonaid documentation built on June 14, 2022, 1:06 a.m.