scatterplot.r2p | R Documentation |
The function could be used as drawing a scatterplot with or without category/group variable. In addition, r2 and p for fitted regression lines can be shown automatically.
scatterplot.r2p(dat,x = x,y = y,group = NULL, color=NULL, pty=NULL, cex.size=1,cornerlabel=NULL,r2.p.pos=c(0.1,0.95),level.off=FALSE,blank=0,...)
dat |
a data.frame.
x |
a variable in x axis.
y |
a variable in y axis.
group |
a group variable; the group default is NULL.
color |
a color array for different groups.
pty |
a array on point types, which the length should match the number of group levels.
cex.size |
a cex size in figure options.
cornerlabel |
add a marker at corner position.
r2.p.pos |
the position of r2.p which ranges from (0,1) for x and y axises.
level.off |
whether level is shown or not.
blank |
modify the distance between level marker and r2.p text.
data(leaflife,package='smatr')
scatterplot.r2p(dat=leaflife, x = 'longev', y = 'lma', pty = 19)
scatterplot.r2p(dat=leaflife, x = 'longev',y = 'lma', group = 'soilp', pty = c(1, 19))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.