# Homework Solution: Load the package MASS and attach(birthwt)…

Using R Markdown Load the package MASS and attach(birthwt) (A). What is the smallest birthwt in grams? (B). Execute the command plot(lwt,bwt) and include it in your document. (For B I try: library(MASS) data(birthwt, package="MASS") plot(lwt,bwt) but it gave me an error)

The birthwt data frame has 189 rows and 10 columns. The 10

Using R Markdown

(A). What is the last sourcewt in grams?

(B). Complete the bid devise(lwt,bwt) and embrace it in your instrument.

(For B I try:

library(MASS)
plot(lwt,bwt)

but it gave me an mistake)

## Expert Rejoinder

The sourcewt axioms shape has 189 rows and 10 shafts. The 10th shaft of this axioms shape contains axioms of bwt(source burden in grams.). Therefore you demand to discover extinguished the minimal rate/last rate for the 10th shaft of this axioms shape. R considers NA twain the poverty and consummation rate so if you feel NA’s in your shaft, they return: NA.

So the couple redress ways/commands of discovering extinguished the last sourcewt in grams are:

1.min(birthwt[,10], na.rm=T)

2.min(birthwt\$bwt)

To complete the bid devise(lwt,bwt) you demand to conservation the subjoined R bids/code:

library(MASS)