Factors are variables to correspond categories. Categories are discrete in addition to non continuous. In statistics in that place is a necessitate for such a variable.
Let us say, I curl the die a dozen times in addition to come upward up amongst values for each curl equally shown:
2,4,5,3,2,6,10,5, 9,6,4,5
I tin assemble these inwards a information equally shown inwards R amongst "dat":
data
---------------------------------
---------------------------------
Now I role 'factor' equally used inwards R:
facData=factor(data)
--------------------
-----------------------
factor simply took ane unique exceptional from the listing presented to it to display inwards Levels. There were 2 4's, 3 5's in addition to 2 6's. It categorized them.
While the master copy information was numeric they could hold upward also graphic symbol information inwards "datac" below:
-------------------------------
We know the unique ones inwards the inwards a higher house data. How are nosotros going to detect how many of each are there?
For this nosotros tin role the table() inwards R equally shown below:
------------------------------------
You tin banking concern fit for yourself, that it picked the right value for each category.
Let us say, I curl the die a dozen times in addition to come upward up amongst values for each curl equally shown:
2,4,5,3,2,6,10,5, 9,6,4,5
I tin assemble these inwards a information equally shown inwards R amongst "dat":
data
---------------------------------
---------------------------------
Now I role 'factor' equally used inwards R:
facData=factor(data)
--------------------
-----------------------
factor simply took ane unique exceptional from the listing presented to it to display inwards Levels. There were 2 4's, 3 5's in addition to 2 6's. It categorized them.
While the master copy information was numeric they could hold upward also graphic symbol information inwards "datac" below:
-------------------------------
We know the unique ones inwards the inwards a higher house data. How are nosotros going to detect how many of each are there?
For this nosotros tin role the table() inwards R equally shown below:
------------------------------------
You tin banking concern fit for yourself, that it picked the right value for each category.
Komentar
Posting Komentar