Skip to content

Shiny - read file with BCG_ATTR #91

@leppott

Description

@leppott

Describe the bug
BCG_ATTR can cause issue with complex number.

To Reproduce
Rework import feature as not all permutations.
Server.R

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Additional context
From BCGcalc Server.R

Read the file first:

    df_header <- read.delim(fn_inFile
                            , header = TRUE
                            , sep = ","
                            , stringsAsFactors = FALSE
                            , na.strings = c("", "NA")
                            , nrows = 0)
    col_num_bcgattr <- grep("BCG_ATTR", toupper(names(df_header)))
    classes_df <- sapply(df_header, class)
    col_name_bcgattr <- names(df_header)[col_num_bcgattr]

Then use column name present in file during import.

df_input <- read.table(fn_inFile
                             , header = TRUE
                             , sep = ","
                             , stringsAsFactors = FALSE
                             , na.strings = c("", "NA")
                             , colClasses = c(col_name_bcgattr = "character"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions