
Prepare Control for Upload
prepare_control_for_upload.Rd
This function prepares a user_data dataframe for upload by adding a 'Control' column (generated from Density and CompositionID values), and by adding 'Created' and 'LastUpdated' columns with the current timestamp.
Examples
test_data <- data.frame(Density = c(100, 1000, 1500),
CompositionID = c("S1_1", "S3_2", "S2_2"))
prepare_control_for_upload(test_data, Sys.time())
#> Density CompositionID Control Created LastUpdated
#> 1 100 S1_1 100_S1_1 2025-02-13 01:36:16 2025-02-13 01:36:16
#> 2 1000 S3_2 1K_S3_2 2025-02-13 01:36:16 2025-02-13 01:36:16
#> 3 1500 S2_2 1.5K_S2_2 2025-02-13 01:36:16 2025-02-13 01:36:16