 # 1. The pairs command had an additional function that would put a hi...

## Question

1. The pairs command had an additional function that would put a histogram on its diagonal:

panel.hist <- function(x, ...) {
usr <- par("usr"); on.exit(par(usr))
par(usr = c(usr[1:2], 0, 1.5) )
h <- hist(x, plot = FALSE)
breaks <- h\$breaks; nB <- length(breaks)
y <- h\$counts; y <- y/max(y)
rect(breaks[-nB], 0, breaks[-1], y, col = "cyan", ...)
}

For each line of the function, explain what it’s doing.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

panel.hist <- function(x, ...) {

We are creating a function named as “panel.hist” in first line. The above code is used to create histogram on the diagonals in a scatter plot matrix.

usr <- par("usr"); on.exit(par(usr))
The above function calculates the number of pairs of correlation or scatter plots....

By purchasing this solution you'll be able to access the following files:
Solution.docx.

\$8.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.