saving . . . saved plot function has been deleted. plot function has been hidden .
plot function
output :

plot(sin, -pi, 2*pi)
Sir,please explain first two parameters in this function.
 sin is first parameter which is x-parameter. but its appearing on Y axis.

R Introduction-to-basics-of-R 07-08 min 0-10 sec 27-04-20, 12:19 p.m.


The first two arguments inside a plot() function arex-axis values and y-axis values respectively. In order to generate a sine function, you should use the commands as given below: 

x = seq(-2*pi, 2*pi, 0.1)
y = sin(x)
plot(x, y, "l")
27-04-20, 12:44 p.m. sudhakarst
thank you
27-04-20, 8:59 p.m.

Login to add comment

Log-in to answer to this question.