Description Usage Arguments Examples
View source: R/MarkdownReportsDev.R
Add linear regression, and descriptors to line to your scatter plot. Provide the same dataframe as you provided to wplot() before you called this function
1 2 3 4 5 6 7 8 | wLinRegression(
DF,
coeff = c("pearson", "spearman", "r2")[3],
textlocation = "topleft",
cex = 1,
OverwritePrevPDF = unless.specified("b.save.wplots"),
...
)
|
DF |
The same dataframe as you provided to wplot() before you called this function |
coeff |
What coefficient to display? Either "all", "pearson", "spearman" correlation values or "r2" for the Coefficient of Determination. |
textlocation |
where to put the legend? |
cex |
font size; 1 by default |
OverwritePrevPDF |
Save the plot immediately with the same name the last wplot* function made (It is stored in plotnameLastPlot variable). Never inserts an mdlink. |
... |
Additional parameters for the line to display. |
1 2 | try.dev.off(); x = cbind(a = rnorm(1:10), b = rnorm(10)); wplot(x)
# wLinRegression(x, coeff = c("pearson", "spearman", "r2")[3])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.