R/date_to_char.R

Defines functions date_to_char

date_to_char <-
function(x){
   var_view<-var_view(x)
  datevar_names<-as.character(var_view[(var_view$formats=="dates times" | var_view$formats=="date"),]$varname)
  if(length(datevar_names) != 0){
  for(i in 1:length(datevar_names)){
    x[[datevar_names[i]]]<-as.character(x[[datevar_names[i]]])
    }
  }
  return(x)
}

Try the ImportExport package in your browser

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

ImportExport documentation built on May 29, 2017, 10:55 a.m.