Skip to content

Commit

Permalink
usability fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsontom committed Feb 15, 2024
1 parent d78c2a9 commit 9423381
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion R/refractive_index_prediction.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

refractive_index_prediction <- function(gaml_file, standards)
{
gaml_tbl <- gaml2r::openFile(gaml_file, output = 'tbl_df')
gaml_tbl <- gaml2r::openFile(gaml_file, output = 'tbl_df', include_injection_info = TRUE) %>%
dplyr::select(sample_name, value, position)

max_ri_values <- gaml_tbl %>%
dplyr::group_by(sample_name) %>%
Expand All @@ -23,6 +24,7 @@ refractive_index_prediction <- function(gaml_file, standards)
standards_only <- standards %>%
dplyr::left_join(., max_ri_values, by = 'sample_name')
} else{
data(nacl_sg_standards)
standards_only <- nacl_sg_standards %>%
dplyr::left_join(., max_ri_values, by = 'sample_name')
}
Expand All @@ -40,6 +42,13 @@ refractive_index_prediction <- function(gaml_file, standards)
max_ri_values %>% dplyr::mutate(predicted_value = predict_ri)


sample_position <-
gaml_tbl %>% dplyr::select(-value) %>% dplyr::distinct()

ri_final <- ri_results %>% dplyr::left_join(., sample_position, by = 'sample_name')



return(ri_results)

}

0 comments on commit 9423381

Please sign in to comment.