Friday, December 15, 2017

How do I ‌put x and y values as data input in R programming?

In constructing relationship between x and y, we create a table with two columns, with x in the first column and corresponding y in the second column. The value of x may be discrete (numeric or non-numeric) or continuous(numeric) and y is numeric. A graph with x and y represents the table of values.
In the following there are six categories (A through F) and for each of these categories a value has been assigned (67,47,11,12,22,24). Now how do I create a data in R that I could work on?
This is easily carried out by creating a data frame as shown:

> dap <- br="" data.frame="">+  x=factor(c("A","B","C","D","E","F"), levels=c("A","B","C","D","E","F")),
+ ItmVal=c(69,47,11,12,42,24)
-----------------------------------


DataFrameDiscrete.png

No comments: