The R Console can be used for Basic Calculation such as Addition, Division, Multiplication, Subtraction and Division. Once the calculation is done, we can also assign values. The letter ‘c’ is a command in r tells the program that the user is entering a number. While making a plot function, we use “?plot” which will give the x coordinate and y coordinate and the “type” will tell whether it would be a point or a line. Once we define ‘type’= 1 , it joins all the points in the graph and so on. Here we can create a y axis with a limit of 1-10. Let us look into the statement:
Here it gives the numbers 1-10. It only plots y. Similarly once we plot x, the graph changes according to the values in x.
If the user wants to plot x with y, we can add the code :
It will merge the values of x and y and present the graph.
Got a question for us?? Mention them in the comments section and we will get back to you.