R/encoding_data.R

Defines functions encoding_data

Documented in encoding_data

#' @title encoding_data
#' @description this function returns a data frame where character columns are encoded as UTF-8. it is a helper function in get_data_from_izmir
#' @param data A data frame obtained from get_data_from_izmir
#'
encoding_data <-function(data){
  for (col in colnames(data)){
    if(is.character(data[[col]])==TRUE){
      Encoding(data[[col]]) <- "UTF-8"
    }
  }
  return(data)
}

Try the izmir package in your browser

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

izmir documentation built on March 7, 2023, 6:44 p.m.