Man pages for rmsharp/animalr
Provides Useful Functions for the SNPRC Animal Database

add_arc_species_codeAdds arc_species_code for each animal in character vector id...
add_birth_dateReturns dataframe with POSIXct date vector of birth dates for...
add_colonyReturns dataframe with colony for each animal in character...
add_common_nameReturns dataframe with and additional column (common_name)...
add_death_dateReturns dataframe with POSIXct date vector of death dates for...
add_departure_dateReturns dataframe with POSIXct date vector of departure dates...
add_sexReturns dataframe with sex for each animal in character...
alias_id_to_snprc_idConverts an alias (alternate) animal Id to an animal Id.
begin_tranBegins a transaction
commit_tranCommits a database transaction
create_age_location_sex_species_viewCreates v_animal_age_location_sex_species as a view in animal...
create_XhalfaversaryCreate the database table 'animal.dbl.Xhalfaversary'
delete_database_record_by_object_idReturns logical vector indicating TRUE if record was deleted.
delete_database_tblReturns TRUE if the database table was successfully deleted.
delete_id_from_tblReturns the number of rows deleted from a database table when...
delete_offspring_from_offspring_tableReturns the number of rows deleted from the offspring table
disable_triggerHas the side effect of disabling a specific trigger as...
drop_XhalfaversaryDrops Xhalfaversary table and returns TRUE if the database...
enable_triggerHas the side effect of enabling a specific trigger as defined...
fill_halfaversary_tblFill the database table 'animal.dbl.Xhalfaversary'
get_age_distGet the maximum age within a species for a specific date...
get_assignments_to_iacucReturns dataframe with the animals with a status of assigned,...
get_audit_proc_dfReturns dataframe with audit table data for...
get_audit_vitals_dfReturns dataframe with audit table data for audit_vitals...
get_audit_weight_dfReturns dataframe with audit_weight data of animals from...
get_average_number_of_cagematesReturns the average number of cagemates each animal has for...
get_births_in_iacucReturns a dataframe containing the id, sex, and birth date of...
get_cagematesReturns the cagemates and total number of days together for...
get_charge_account_tableGet charge_account table contents
get_column_namesReturns a character vector containing all of the column names...
get_common_name_for_arc_species_codesGet common name for arc_species_codes
get_common_name_for_genusMake a named vector to translate three letter genus and...
get_common_name_for_species_codeReturns a character vector of common names using a vector of...
get_dams_with_infantsDams with infants within a specified date range of provided.
get_direct_ancestorsGet direct ancestors for supplied IDs.
get_dispositions_for_iacucReturns dataframe with the disposition code, disposition...
get_female_exposed_to_male_daysGet number of days females were exposed to fertile males.
get_first_offspringGet the first offspring for animals of a specified sex and...
get_id_active_IACUCGet IACUCs active for an animal on a specified date.
get_id_clinical_admitGet clinical admissions active for an animal on a specified...
get_ids_having_specific_charReturns dataframe with animals having a specific character in...
get_id_strReturns the character string corresponding to the animal Id...
get_location_on_dateGet location from 'animal.dbo.location' for each animal on...
get_maintenance_iacucGet dataframe with maintenance IACUC protocols including...
get_max_ageGet the maximum age within a species for a specific date...
get_non_productive_animalsGet non-productive animals of a specified sex,...
get_number_of_cagematesReturns the number of cagemates each animal has for each day...
get_object_ids_in_tblReturns a character vector of OBJECT_ID values from a...
get_object_ids_not_in_tblReturns a character vector of OBJECT_ID values from a...
get_proc_dfGet procedure data for animals within date ranges.
get_rearingGet rearing code and rearing description for Ids provided.
get_relativesReturns a data frame containing four columns: id, sire_id,...
get_siblingsReturns data frame with specified siblings for Ids provided.
get_table_namesReturns a character vector of table names for the database...
get_table_names_w_id_colReturns a character vector of table names for the database...
get_tables_and_columnsGet tables and columns for a database connection.
get_tables_views_and_columnsGet tables, views, and columns for a database connection.
get_tables_with_dataReturns a dataframe with a character vector listing the table...
get_table_w_colReturns a character vector of tables names for the database...
get_tran_countGet TRANSACTION count
get_trigger_nameReturns a character vector with one trigger name af a...
get_vasectomized_malesGet vasectomized males of a specified arc_species_code that...
get_view_namesReturns a character vector of view names for the database...
get_vitals_dfReturns dataframe with vitals, date_tm of collection, user...
get_weight_dfReturns dataframe with weights, date_tm of collection, user...
has_id_columnReturns a logical vector indicating whether or not each table...
is_animal_aliveReturns logical vector indicating if id is animal in master...
is_animal_idReturns logical vector indicating if animal ids are in...
is_bad_animal_idReturns the proported animal Id(s) that cannot be found in...
is_database_tblReturns TRUE if table exist and FALSE if it does not
is_database_viewReturns TRUE if view exist and FALSE if it does not
is_locationReturns logical vector indicating if a location exists.
is_primate_idReturns logical vector indicating if animal ids represent a...
remove_housekeeping_columnsReturns a character vector with the column_names vector...
rollback_tranRollsback a transaction, returns FALSE if there is not a...
row_existReturns logical vector of length one indication whether or...
rows_with_id_in_tableReturns integer vector of length one indicating the number of...
update_ids_in_tables_by_idReturns the number of rows updated when old Ids are replaced...
Xhalfaversary_insertInserts animal Ids of all primates with each half birth day...
rmsharp/animalr documentation built on March 10, 2021, 1:12 p.m.