R: Plot the distribution of the contrast parameter
plotDistClass
R Documentation
Plot the distribution of the contrast parameter
Description
Distribution of a contrast parameter according to the tissue class.
Usage
## S4 method for signature 'MRIaggr'
plotDistClass(object, param, param.membership, num = NULL,
bw.adjust = 1, kernel = "gaussian", from = NULL, to = NULL, ylim = NULL,
col = 1:6, main = NULL, mgp = c(2,0.5,0), type = "l",
pch = 20, lwd = 1, x.legend = "topright", y.legend = NULL, cex.legend = 0.8,
filename = paste(object@identifier, "plotDistClass", sep = "_"), ...)
Arguments
object
an object of class MRIaggr. REQUIRED.
param
the contrast parameter to display. character. REQUIRED.
param.membership
the parameters indicating the probabilistic membership to the tissue classes. character vector.
num
the slices to use. numeric vector or NULL.
bw.adjust
the smoothing bandwidth to use. numeric. See density for more details.
kernel
the smoothing kernel to use. character. See density for more details.
from,to
the left and right-most points of the grid at which the density is to be estimated. numeric or NULL leading to automatic adjustment. See density for more details.
ylim
the y limits of the plot. numeric vector of size 2 or NULL leading to automatic setting of the y limits.
col
the colors with which the distributions will be displayed. character vector.
main
an overall title for the plot. character.
mgp
the margin line for the axis title, axis labels and axis line. positive numeric vector of size 3.
type
the type of plot to display. character. See plot.default for more details.
pch
the symbol with which the distribution will be displayed. positive integer.
lwd
the line width. postive numeric.
x.legend
the x coordinates of the legend. numeric or character.
y.legend
the y coordinates of the legend. numeric or character.
cex.legend
the expansion factor of the legend. positive numeric.
filename
the name of the file used to export the plot. character.
...
additional arguments to be passed to optionsMRIaggr for specifying the graphical parameters.
Details
ARGUMENTS:
Information about the num argument can be found in the details section of initNum.
Information about the lwd argument can be found in par.
Information about the x.legend, y.legend, cex.legend arguments can be found in legend (cex.legend is the cex argument of legend).
Argument(s) ... must correspond to some of the following arguments : height, hemisphere, norm_mu, norm_sigma, path, res, unitwidth, window.
FUNCTION:
This method relies on the density function.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MRIaggr)
Loading required package: Rcpp
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MRIaggr/MRIaggr-plotDistClass.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotDistClass
> ### Title: Plot the distribution of the contrast parameter
> ### Aliases: plotDistClass plotDistClass,MRIaggr-method
> ### Keywords: methods
>
> ### ** Examples
>
> ## load a MRIaggr object
> data("MRIaggr.Pat1_red", package = "MRIaggr")
>
> ## display
> plotDistClass(MRIaggr.Pat1_red, param = "DWI_t0",
+ param.membership = c("MASK_T2_FLAIR_t2"))
>
> # specify the smoothing bandwidth
> plotDistClass(MRIaggr.Pat1_red, param = "DWI_t0", bw.adjust = 1,
+ param.membership="MASK_T2_FLAIR_t2")
>
> # specify the scale
> plotDistClass(MRIaggr.Pat1_red, param = "DWI_t0", bw.adjust = 1,
+ from = 200, to = 300, param.membership = "MASK_T2_FLAIR_t2")
>
> # use several classes
> ## Not run:
> ##D
> ##D plotDistClass(MRIaggr.Pat1_red, param = "TTP_t0", bw.adjust = 2,
> ##D param.membership = c("CSF","WM","GM","MASK_T2_FLAIR_t2"))
> ##D
> ##D plotDistClass(MRIaggr.Pat1_red, param = "DWI_t0", bw.adjust = 2,
> ##D param.membership = c("CSF","WM","GM","MASK_T2_FLAIR_t2"))
> ## End(Not run)
>
>
>
>
>
>
> dev.off()
null device
1
>