plot_spagh: Plot Spagh

View source: R/Plot_Spagh.R

plot_spaghR Documentation

Plot Spagh

Description

Create spaghetti plot with various customisation

Usage

plot_spagh(
  df,
  x = "TIME",
  y = "DV",
  group = "",
  col = "",
  shape = "",
  lty = "",
  facetwrap = "",
  facetgrid = "",
  group_split = "",
  facetscale = "free",
  median = F,
  point_alpha = 1,
  line_alpha = 1,
  standardisation = "",
  ylog = T,
  xlog = F,
  loq = "",
  filter = "",
  title = "",
  subtitle = "",
  caption = "",
  xlabs = "",
  ylabs = "",
  collabs = "",
  shapelabs = "",
  ltylabs = "",
  colmanual = "",
  shapemanual = "",
  ltymanual = "",
  output = "plot",
  sizetext = 15,
  removeNA = T,
  bkgrd = T,
  filter2 = "",
  bkgrdalpha = 0.3,
  addlines = tibble(type = "none"),
  plotly = F,
  workwithexpr = T
)

Arguments

df

dataframe to analyze

x

x-axis

y

y-axis

group

grouping variable

col

coloring variable

shape

shaping variable

lty

lty variable

facetwrap

variable for facetwrap

facetgrid

seecond variable for facetgrid

group_split

To create a list of plot

facetscale

classical "free", "free_x", "free_y"

median

if wanting median to be plotted

point_alpha

point alpha (transparancy) value, between 0 and 1

line_alpha

line alpha (transparancy) value, between 0 and 1

standardisation

column of number value for standardisation (y = y / standardisation)

ylog

True or False

xlog

True or False

loq

LOQ value

filter

main filter

title

title

subtitle

subtitle

caption

caption

xlabs

xlabs

ylabs

ylabs

collabs

col labs

shapelabs

ylabs

ltylabs

ylabs

colmanual

col selection

shapemanual

shape selection

ltymanual

ylabs

output

output

sizetext

Sizetext (default 15)

removeNA

If True, automatically remove all NA values

bkgrd

If True, activate the "background" system

filter2

Filter2 (after fixing background)

bkgrdalpha

Alpha for background, between 0 and 1

addlines

Addline table (for ShinyApp)

plotly

True to activate plotly (dynamic plot)

workwithexpr

True to use expression (console), false to use character string (ShinyApp)

Author(s)

Thibaud Derippe


Peccary-PMX/PeccAnalysis documentation built on July 7, 2022, 5:27 a.m.