after using mt_as_event_attribute() colums are both event and track table
Hi @bartk, just checking if this is the intended behavior. When using mt_as_event_attribute(), the columns appear in the event table, but stay in the track table too, is that the intended behavior?
library(move2)
mv2 <- movebank_download_study(study_id = 1918503,
attributes = NULL,
sensor_type_id = "radio-transmitter")
#> ℹ In total 249 records were omitted as they were not deployed (the
#> `deployment_id` was `NA`).
names(mv2)
#> [1] "deployment_id" "timestamp" "geometry"
names(mt_track_data(mv2))
#> [1] "deployment_id" "tag_id"
#> [3] "individual_id" "sensor_type_ids"
#> [5] "capture_location" "deploy_on_location"
#> [7] "deploy_off_location" "individual_local_identifier"
#> [9] "sex" "taxon_canonical_name"
#> [11] "individual_number_of_deployments" "mortality_location"
#> [13] "tag_number_of_deployments" "study_id"
#> [15] "acknowledgements" "citation"
#> [17] "has_quota" "i_am_owner"
#> [19] "is_test" "license_terms"
#> [21] "license_type" "name"
#> [23] "study_number_of_deployments" "number_of_individuals"
#> [25] "number_of_tags" "principal_investigator_name"
#> [27] "study_objective" "study_type"
#> [29] "suspend_license_terms" "i_can_see_data"
#> [31] "there_are_data_which_i_cannot_see" "i_have_download_access"
#> [33] "i_am_collaborator" "study_permission"
#> [35] "timestamp_first_deployed_location" "timestamp_last_deployed_location"
#> [37] "number_of_deployed_locations" "taxon_ids"
#> [39] "contact_person_name" "main_location"
allcol <- names(mt_track_data(mv2))
mv2_2 <- mt_as_event_attribute(mv2, all_of(allcol))
names(mv2_2)
#> [1] "deployment_id" "timestamp"
#> [3] "geometry" "tag_id"
#> [5] "individual_id" "sensor_type_ids"
#> [7] "capture_location" "deploy_on_location"
#> [9] "deploy_off_location" "individual_local_identifier"
#> [11] "sex" "taxon_canonical_name"
#> [13] "individual_number_of_deployments" "mortality_location"
#> [15] "tag_number_of_deployments" "study_id"
#> [17] "acknowledgements" "citation"
#> [19] "has_quota" "i_am_owner"
#> [21] "is_test" "license_terms"
#> [23] "license_type" "name"
#> [25] "study_number_of_deployments" "number_of_individuals"
#> [27] "number_of_tags" "principal_investigator_name"
#> [29] "study_objective" "study_type"
#> [31] "suspend_license_terms" "i_can_see_data"
#> [33] "there_are_data_which_i_cannot_see" "i_have_download_access"
#> [35] "i_am_collaborator" "study_permission"
#> [37] "timestamp_first_deployed_location" "timestamp_last_deployed_location"
#> [39] "number_of_deployed_locations" "taxon_ids"
#> [41] "contact_person_name" "main_location"
names(mt_track_data(mv2_2))
#> [1] "deployment_id" "individual_id"
#> [3] "sensor_type_ids" "capture_location"
#> [5] "deploy_on_location" "deploy_off_location"
#> [7] "individual_local_identifier" "sex"
#> [9] "taxon_canonical_name" "individual_number_of_deployments"
#> [11] "mortality_location" "tag_number_of_deployments"
#> [13] "study_id" "acknowledgements"
#> [15] "citation" "has_quota"
#> [17] "i_am_owner" "is_test"
#> [19] "license_terms" "license_type"
#> [21] "name" "study_number_of_deployments"
#> [23] "number_of_individuals" "number_of_tags"
#> [25] "principal_investigator_name" "study_objective"
#> [27] "study_type" "suspend_license_terms"
#> [29] "i_can_see_data" "there_are_data_which_i_cannot_see"
#> [31] "i_have_download_access" "i_am_collaborator"
#> [33] "study_permission" "timestamp_first_deployed_location"
#> [35] "timestamp_last_deployed_location" "number_of_deployed_locations"
#> [37] "taxon_ids" "contact_person_name"
#> [39] "main_location"
Created on 2023-08-02 with reprex v2.0.2