plotRespFun {RCM} | R Documentation

## Plot the non-parametric response functions

### Description

Plots a number of response functions over the observed range of the environmental score. If no taxa are provided those who react most strongly to the environmental score are chosen.

### Usage

    plotRespFun(
      RCM,
      taxa = NULL,
      type = "link",
      logTransformYAxis = FALSE,
      addSamples = TRUE,
      samSize = NULL,
      Dim = 1L,
      nPoints = 100L,
      labSize = 2.5,
      yLocVar = NULL,
      yLocSam = NULL,
      Palette = "Set3",
      addJitter = FALSE,
      nTaxa = 9L,
      angle = 90,
      legendLabSize = 15,
      legendTitleSize = 16,
      axisLabSize = 14,
      axisTitleSize = 16,
      lineSize = 0.75,
      ...
    )

### Arguments

`RCM` | an RCM object
`taxa` | a character vector of taxa to be plotted
`type` | a character string, plot the response function on the log-scale ('link') or the abundance scale 'response', similar to predict.glm().
`logTransformYAxis` | a boolean, should y-axis be log transformed?
`addSamples` | a boolean, should sample points be shown?
`samSize` | a sample variable name or a vector of length equal to the number of samples, for the sample sizes
`Dim` | An integer, the dimension to be plotted
`nPoints` | the number of points to be used to plot the lines
`labSize` | the label size for the variables
`yLocVar` | the y-location of the variables, recycled if necessary
`yLocSam` | the y-location of the samples, recycled if necessary
`Palette` | which color palette to use
`addJitter` | A boolean, should variable names be jittered to make them more readable
`nTaxa` | an integer, number of taxa to plot
`angle` | angle at which variable labels should be turned
`legendLabSize` | size of the legend labels
`legendTitleSize` | size of the legend title
`axisLabSize` | size of the axis labels
`axisTitleSize` | size of the axis title
`lineSize` | size of the response function lines
`...` | Other argumens passed on to the ggplot() function

### Value

Plots a ggplot2-object to output

### See Also

`RCM`, `plot.RCM`,`residualPlot`

### Examples

    data(Zeller)
    require(phyloseq)
    tmpPhy = prune_taxa(taxa_names(Zeller)[1:100],
    prune_samples(sample_names(Zeller)[1:50], Zeller))
    #Subset for a quick fit
    zellerRCMnp = RCM(tmpPhy, k = 2,
    covariates = c('BMI','Age','Country','Diagnosis','Gender'),
    round = TRUE, responseFun = 'nonparametric')
    plotRespFun(zellerRCMnp)

[Package RCM version 1.8.0 Index]