tern icon indicating copy to clipboard operation
tern copied to clipboard

Warning message when using Admirial created adsl data

Open shajoezhu opened this issue 1 year ago • 4 comments

Warning messages:
1: In as_factor_keep_attributes(x, x_name = .var, na_level = na_level,  :
  automatically converting character variable AESTRTPT to factor, better manually convert to factor to avoid failures
result <- basic_table() %>%
  split_cols_by(var = "TRT01A") %>%
  add_colcounts() %>%
  add_overall_col(label = "All Patients") %>%
  
  count_patients_with_event(
    vars = "USUBJID",
    table_names = "usubjid_EOSSTT_Completed",
    filters = c("EOSSTT" = "Completed"),
    denom = "N_col",
    .labels = c(count_fraction = "Completed study")
  ) %>% 
  count_patients_with_event(
    vars = "USUBJID",
    table_names = "usubjid_EOSSTT_Ongoing",
    filters = c("EOSSTT" = "Ongoing"),
    denom = "N_col",
    .labels = c(count_fraction = "Ongoing study")
  ) %>% 
  
  split_rows_by("SEX") %>%
  summarize_vars(
    "BMIBL"
  ) %>%
  
  build_table(df = adsla, alt_counts_df = adsla) %>% 
  trim_rows() 

result

shajoezhu avatar May 26 '23 03:05 shajoezhu

I do not think this is an issue. That column eventually should be a factor, right?

Melkiades avatar May 26 '23 07:05 Melkiades

You are right @Melkiades , I am flagging this just to collect some feedback on how people using admirial data with our packages, and things we may get asked for

shajoezhu avatar May 26 '23 08:05 shajoezhu

It may give error messages as well

Error: Error applying analysis function (var - RACE): Number of rows generated by analysis function do not match across all columns. 
Perhaps convert analysis variable RACE to a factor?
	occured at (row) path: root
In addition: Warning messages:

shajoezhu avatar Jul 07 '23 06:07 shajoezhu

is it causing an error? I still think the warning is quite exhaustive

Melkiades avatar Jul 07 '23 09:07 Melkiades