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

get_tags() fails on tag_serial_number with comma as output by get_animals() #288

Open
PietrH opened this issue Dec 4, 2023 · 0 comments

Comments

@PietrH
Copy link
Member

PietrH commented Dec 4, 2023

In #287 it was suggested passing the tag_serial_number from get_animals() to get_tags instead of having comma separated serial_tag_number values when there are multiple sensors per tag.

Example of comma seperated values:

get_animals() %>% filter(stringr::str_detect(tag_serial_number, ","))
animal_id animal_project_code tag_serial_number
2779 2013_albertkanaal 1278974,1278974
2780 2013_albertkanaal 1278975,1278975
2781 2013_albertkanaal 1278976,1278976
2782 2013_albertkanaal 1278977,1278977
2783 2013_albertkanaal 1278978,1278978

However, you can't pass such a tag_serial_number to get_tags() directly at the moment:

get_tags(tag_serial_number = "1278974,1278974")

#> Error: Can't find tag_serial_number `1278974,1278974` in: 02BR 7329, 02BS 7330, 02BT 7331, 02BU 7332, 02BV 7333, 02BW 7334, 02BX 7335, 02BY 7336, 02BZ 7337, 02C0 7338, 02C1 7339, 02C2 7340, 02C3 7341, 02C4 7342, 02C5 7343, 02C6 7344, 02C7 7345, 02C8 7346, 02C9 7347, 02CA 7348, 02CB 7349, 02CC 7350, 02CD 7351, 02CE 7352, 02CF 7353, 02CG 7354, 02CH 7355, ...
 

Because they are passed, and compared as strings, not vectors.

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

No branches or pull requests

1 participant