Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shiny - import error after taxa translate #77

Closed
leppott opened this issue Jun 8, 2023 · 8 comments
Closed

Shiny - import error after taxa translate #77

leppott opened this issue Jun 8, 2023 · 8 comments
Assignees
Labels

Comments

@leppott
Copy link
Owner

leppott commented Jun 8, 2023

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

  1. Run taxa translator.
  2. Reload the "merged" file.

Expected behavior
Should be no error.

Screenshots
image

Additional context
Happens for all translation versions (BCG, MTTI, Fuzzy Set, Thermal Metrics).

R Console.

image

image

@leppott
Copy link
Owner Author

leppott commented Jun 8, 2023

Related to BCG_ATTR and complex vs. character vs. numeric class.

The statement on line 214 is failing.

@leppott
Copy link
Owner Author

leppott commented Jun 8, 2023

Resolved by using the specific name. Naming all the columns could sometimes lead to other logical fields not working properly. (In this case it was Noteworthy column causing issues).

image

leppott added a commit that referenced this issue Jun 8, 2023
* fix: Modify code for complex number (BCG_ATTR), Issue #77
    + Other logical fields could cause issues with older import method
@leppott leppott closed this as completed Jun 8, 2023
@leppott leppott reopened this Jun 12, 2023
@leppott
Copy link
Owner Author

leppott commented Jun 12, 2023

Complex numbers in BCG_ATTR and/or Noteworthy column causing issues on import in Merge Files section.

@leppott leppott self-assigned this Jun 13, 2023
@leppott
Copy link
Owner Author

leppott commented Jun 13, 2023

Modify server files in MERGE FILES section so only BCG_ATTR gets a new class and leaves other columns as is.

Image

@leppott
Copy link
Owner Author

leppott commented Jun 13, 2023

colClasses = c(foo = "character")

foo not being evaluated and combinations of get, eval, and parse aren't helping.

Go back to specifying all classes. use in regular import and Merge Files sections.

@leppott
Copy link
Owner Author

leppott commented Jun 13, 2023

May have issues with other columns if all blank (come in a logical). for example, the previous issue with the NOTEWORTHY column.

leppott added a commit that referenced this issue Jun 13, 2023
* refactor: Modify code for import and merge files, Issue #77
    + Only specify BCG_ATTR column
    + Undoes some edits in v2.0.0.9081
* fix: Adjust import function to allow for user selection of tab or comma
    + Comma was hard coded even though gave user the choice of separators
@leppott leppott closed this as completed Jun 13, 2023
leppott added a commit that referenced this issue Jun 19, 2023
- fix: Update complex number import code (BCG_ATTR), Issue \#77
  - Should work in all cases and not cause issues with other fields
- feature: Enable BDI calculation in Shiny app, Issue \#66
  - PARTIAL
@leppott
Copy link
Owner Author

leppott commented Jun 19, 2023

Believe have a permanent fix.

It was the complex number thing so have to specify the name and class of the field. Can't do the name of the field with a variable.

Try 1 = I had several permutations of BCG_ATTR specified but it didn't cover all files. Also produced warning in console of not all columns specified existed. Invisible to user in Shiny so ok.

Try 2 = specify class of all columns. This messed up the Noteworthy column. Not sure why but it did.

Try 3 = some kind of hybrid but using a variable name for BCG_ATTR didn't work.

Try 4 = (This final one). Use the specify class vector but only for the BCG_ATTR column. Seems to work in all spellings of BCG_ATTR and doesn't affect any other columns. 😊

Along with the above have several IF/THEN on how to handle the file import based on the BCG_ATTR column

  • Not present in the file
  • BCG_ATTR is present but not a complex classs (i.e., all blank or all numbers, not 'i' values).
  • BCG_ATTR is present and is complex. This last case is where all the trouble happens and led to all the tries above.

@leppott
Copy link
Owner Author

leppott commented Jun 19, 2023

Fix applied to master import and merge file imports in Server.R.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant