Plot background — plot_bg • protGear
Description: A generic function for plotting of R objects.

# Plot background

Source: `R/read_files_functions.R`
`plot_bg.Rd`

A generic function for plotting of R objects.

    plot_bg(df, x_axis = "antigen", bg_MFI = "BG_Median", log_mfi = TRUE)

## Arguments

df

  A default dataset to use for plot.

x_axis

  The variable on the x axis

bg_MFI

  A numeric `variable` describing which is the background MFI

log_mfi

  a logical value indicating whether the MFI values should be log transformed or not.

## Value

A ggplot of background values

## Examples

    ## Not run:
    #After extracting the background using \code{\link{extract_bg}}
    #we plot the data using
    allData_bg <- readr::read_csv(system.file("extdata", "bg_example.csv",
     package="protGear"))
    #> Rows: 126 Columns: 6
    #> ── Column specification ────────────────────────────────────────────────────────
    #> Delimiter: ","
    #> chr (2): sampleID, antigen
    #> dbl (4): Block, FBG_Median, BG_Median, replicate
    #>
    #> ℹ Use `spec()` to retrieve the full column specification for this data.
    #> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
    plot_bg(allData_bg,
    x_axis = "antigen",
    bg_MFI = "BG_Median",  log_mfi = TRUE
    )

    ## End(Not run)