plots_model_results: line plot function

Description Usage Arguments Value Examples

View source: R/functions.R

Description

This function generates a line plot showing represent the simulation results

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plots_model_results(
  x,
  name_x,
  y,
  name_y,
  group,
  group_name,
  levels_order,
  y_min,
  y_max,
  title_legend
)

Arguments

x

a numeric vector especifing the x factor

name_x

a character specifing the x axis name

y

a numeric vector especifing the y factor

name_y

a character specifing the y axis name

group

a character vector specifying the grouping factor

group_name

a character specifying the group factor name

levels_order

a character vector specifying the grouping factor order for the legend

y_min

a number especifying the manimum of the y axis

y_max

a number especifying the maximum of the y axis

title_legend

a character specifying the legend title

Value

a line plot

Examples

1
2
3
4
5
y<-c(plot_data$Healthy,plot_data$Latent,plot_data$Sporulated)
x<-rep(plot_data$Days,3)
n<-length(plot_data$Days)
group<-c(rep("Healthy",n),rep("Latent",n),rep("Sporulated",n))
plots_model_results(x,"Days",y,"Pods proportion",group,"Disease status",c("Healthy","Latent","Sporulated"),0,1, "Disease status")

drunita/mr-model documentation built on Dec. 20, 2021, 1:20 a.m.