leppott / XC95

Extirpation analysis (XC95) for benthic macroinvertebrates and fish for environmental variables.
https://leppott.github.io/XC95/
0 stars 2 forks source link

Tibbles as inputs cause issues. #10

Open leppott opened 4 years ago

leppott commented 4 years ago

Describe the bug Tibbles sometimes behave different from data frames.

For example, if use read_csv rather than read.csv the user creates a tibble. The way tibbles react when subsetted can throw off expected data formats inside of the functions.

https://www.r-bloggers.com/using-r-when-weird-errors-occur-in-packages-that-used-to-work-check-that-youre-not-feeding-them-a-tibble/

To Reproduce Steps to reproduce the behavior:

  1. read a files with read_csv (or similar function) that creates a tibble.
  2. Most of the functions will fail with mostly non-easy to interpret errors.

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

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Can fix (and have in other packages) by adding a line to convert any input that might be a tibble to a dataframe.

df.x <- as.data.frame(input.df.x)