Graphing a piece-wise defined function in RKward

Philip (Michael) Dykes thedoctor81877 at gmail.com
Mon Dec 19 14:26:09 UTC 2016


I am very new to both R and Rkward and am trying to plot the following:

f(x)=    x^2, if x <= 2,
             6-x, if x > 2.

How can I do this in Rkward? Also, I would like the graph (plot) to look 
as much as possible like the graph I was in this book (attached).

Thanks so much.

-MD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: piecewise1.jpg
Type: image/jpeg
Size: 76908 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-users/attachments/20161219/4faee62a/attachment-0001.jpg>


More information about the rkward-users mailing list