# \donttest{
results <- TAD::launch_analysis_tad(
weights = TAD::AB[, 5:102],
weights_factor = TAD::AB[, c("Year", "Plot", "Treatment", "Bloc")],
trait_data = log(TAD::trait[["SLA"]]),
aggregation_factor_name = c("Year", "Bloc"),
statistics_factor_name = (statistics_factor_name <- c("Treatment")),
randomization_number = 100,
slope_distance = (
slope_distance <- TAD::CONSTANTS$SKEW_UNIFORM_SLOPE_DISTANCE
),
intercept_distance = (
intercept_distance <- TAD::CONSTANTS$SKEW_UNIFORM_INTERCEPT_DISTANCE
)
)
graph <- TAD::skr_graph(
moments_df = results$weighted_moments,
statistics_factor_name = statistics_factor_name,
statistics_factor_name_breaks = c("Mown_Unfertilized", "Mown_NPK"),
statistics_factor_name_col = c("#1A85FF", "#D41159"),
slope_distance = slope_distance,
intercept_distance = intercept_distance
)
plot(graph)
output_path <- file.path(tempdir(), "outputs")
dir.create(output_path)
TAD::skr_graph(
moments_df = results$weighted_moments,
statistics_factor_name = statistics_factor_name,
statistics_factor_name_breaks = c("Mown_Unfertilized", "Mown_NPK"),
statistics_factor_name_col = c("#1A85FF", "#D41159"),
slope_distance = slope_distance,
intercept_distance = intercept_distance,
dpi = 200,
output_path = file.path(output_path, "moment_graph.png")
)
unlink(output_path, recursive = TRUE, force = TRUE)
# }
Run the code above in your browser using DataLab