# Create a dummy titer table for the example
ag_names <- paste("V", 1:5)
sr_names <- paste("S", 1:4)
titer_table <- matrix(
sample(c(10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120), 20, replace = TRUE),
nrow = length(ag_names), ncol = length(sr_names),
dimnames = list(ag_names, sr_names)
)
# Create and optimize map without saving coordinates
map_obj <- create_and_optimize_RACMACS_map(titer_table)
# Create map and save coordinates to a temporary file.
# tempfile() creates a path in the session's temporary directory.
temp_coords_file <- tempfile(fileext = ".csv")
map_obj_saved <- create_and_optimize_RACMACS_map(
titer_table,
dim = 3,
optimization_number = 100,
output_file = temp_coords_file
)
# Check that the file was created
file.exists(temp_coords_file)
# Clean up the temporary file
unlink(temp_coords_file)
Run the code above in your browser using DataLab