plot function
Title
Question
output : https://drive.google.com/file/d/1nHfeHS7inX-txbedjqF9WA0fUem_mbnh/view?usp=sharing
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
Answers:
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")
Login to add comment