ankemt / MEAanalysis

GNU General Public License v3.0
0 stars 0 forks source link

remove unbound variables from `parse_MEA_file()` #10

Open bvreede opened 3 years ago

bvreede commented 3 years ago

Checking the package yields notes:

> checking R code for possible problems ... NOTE
  clean_content: no visible binding for global variable ‘Parameter’
  clean_content: no visible binding for global variable ‘type’
  extract_header: no visible binding for global variable ‘X1’
  extract_header: no visible binding for global variable ‘level_1’
  extract_header: no visible binding for global variable ‘level_2’
  extract_header: no visible binding for global variable ‘Value’
  Undefined global functions or variables:
    Parameter Value X1 level_1 level_2 type

It would be good to fix this and ensure no unbound variables exist.

bvreede commented 1 year ago

Also created — inadvertently — in make_design_df(), a helper function of parse_designfile()...

Pretty tricky to remove, as they refer to variables created in the function itself, then used:

  # pivot to two columns and sort
  df <- tidyr::pivot_longer(df,
                            cols = tidyr::everything(),
                            names_to = "Group",
                            values_to = "Well")
  #TODO: make_design_df: no visible binding for global variable ‘Well’
  #TODO: make_design_df: no visible binding for global variable ‘Group’
  df <- dplyr::select(df, Well, Group)
  df <- dplyr::arrange(df, Well)

How can we make these 'bound'? 🤔