Question
2.1 Demonstration: N Use R's length procedure to find the number of items in a variable (N). Copy and paste the R code in the
2.1 Demonstration: N Use R's length procedure to find the number of items in a variable (N). Copy and paste the R code in the righthand box below into the Snippets text box at https://rdrr.io/snippets/ and tap the "Run" button.
rdrr.io/snippets/
Line 1: Any line in R that starts with a hashtag is a comment and will be ignored. (Fun fact, the official name for that symbol is "octothorpe.")
Line 2: The length of the eruptions variable in the faithful data frame1 is printed, the same as the number of items in the variable, or N. Notice how a variable is identified using the data frame name, then a dollar sign, then the variable name.
R reports the following N. [1] 272
2.2 Activity: N Using the attitude2 data frame, find the number of items in the rating variable and include that number in the deliverable document for this lab.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started