% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linechart.R
\name{linechart}
\alias{linechart}
\title{Line chart showing the VIKOR results}
\usage{
linechart(
  x,
  sort = "Q",
  exclude = "none",
  n = nrow(x),
  linewidth = 1.1,
  size = 2,
  ...
)
}
\arguments{
\item{x}{An object of class \code{\link{vikor}}.}

\item{sort}{A character specifying the order of treatments on the x-axis.
By default, the order is according to the Q-metric (\code{"Q"}). Ordering
treatments according to the S (\code{"S"}) and R (\code{"R"}) metrics is
also possible.}

\item{exclude}{A character specifying a metric that will not be displayed in
the graph. By default, all metrics are displayed (\code{"none"}).
Alternative options are to exclude either the Q-metric (\code{"Q"}),
the S-metric (\code{"S"}), or the R-metric (\code{"R"}).}

\item{n}{A numeric value indicating the number of treatments to be plotted
in the graph. By default, all treatments are displayed. If specified,
only the first \code{"n"} treatments according to the hierarchy specified
from \code{"sort"} argument are plotted.}

\item{linewidth}{A numeric value specifying the width of the lines
(default: 1.1).}

\item{size}{A numeric value specifying the size of the points
(default: 2).}

\item{\dots}{Additional arguments passed to \code{\link[ggplot2]{ggplot}}
function.}
}
\value{
A \code{ggplot} object.
}
\description{
A line chart showing the results of VišeKriterijumska Optimizacija I
Kompromisno Rešenje (VIKOR) across the three metrics Q, S and R for each
treatment. Within each metric, lower values represent better treatment
performance.
}
\examples{
# Locate file "mvnma_examples.rda" with mvnma() results
.fname <- system.file("extdata/mvnma_examples.rda", package = "mvnma")
load(.fname)

# Rank treatments using SUCRAs (default)
ranks12 <- mvrank(mvnma12, small.values = c("undes", "undes"))
ranks12

# Get the best compromise solution across the efficacy outcomes
vk12 <- vikor(ranks12)

# Visualize the results with default settings
linechart(vk12)

# Sort by the "R" metric
linechart(vk12, sort = "R")

# Sort by the "R" metric and include only the first 3 treatments
linechart(vk12, sort = "R", n = 3)

# Exclude the "R" metric
#
linechart(vk12, exclude = "R")

}
