Answer to Question #264415 in Statistics and Probability for Paul Carpenter

Question #264415

2. Vocabulary and R functions



Enter the following command in R to read a simple help page about the table() command (this is for your information, you do not need to show the output):



?table



Now enter the following command and describe the output of the table() command. What does the first row of numbers in table() output represent? What does the second row of output represent?



x <- c(5, 8, 4, 1, 5, 6, 5, 9, 4, 2, 5, 7, 5, 3, 6, 4, 5, 3, 7, 6)



table(x)



[optional: You can test your theory by altering the numbers and rerunning the table command.]

1
Expert's answer
2022-02-21T14:16:45-0500

output

> x <- c(5, 8, 4, 1, 5, 6, 5, 9, 4, 2, 5, 7, 5, 3, 6, 4, 5, 3, 7, 6)

> table(x)

x

1 2 3 4 5 6 7 8 9 

1 1 2 3 6 3 2 1 1 


the first row in the table represents the value of the variable,

the second row in the table represents the frequency of the value of the variable.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS