Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Bug in extracting new date/time variables in the IDEAR.rmd file #42

@lucazav

Description

@lucazav

I found a bug in the chunk of code that creates new variables from a date/time one.
Here my suggestions:

autogen_datetime_columns <- character()
if(!is.null(config$DateTimeColumns[[1]])){
  for (i in 1:length(config$DateTimeColumns) ) {  #<-- new
  #for (dt in names(config$DateTimeColumns)) {    #<-- old
    dt <- names(config$DateTimeColumns[[i]])
    data[[dt]] <- as.POSIXct(data[[dt]], format = config$DateTimeColumns[[i]][[dt]])  #<-- new
    #data[[dt]] <- as.POSIXct(data[[dt]], format = config$DateTimeColumns[[dt]])      #<-- old
...

HTH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions