Question

Built in Data In R: This Question uses "cystfibr" data found in "ISwR" package. to access...

Built in Data In R:

This Question uses "cystfibr" data found in "ISwR" package. to access this data you need to first install "ISwR" package. then load the library.

Type data() to check which built in data are in the package "ISwR". This should show all the available built in data as:

We use nickel data for this part.

Type >cystfibr to see the data, and then answer the following questions using the data:

(a) type ?cystfibr this will open up a help file explaining about the 'cystfibr' data. What is cystfibr data about?

(b) How many Males and how many Females are in the study?

(c). Construct a bar diagram of the male and female. Change color to Red. {hint: barplot(table(sex))}

(d.) Calculate the average height of the participants

(e). Calculate the variance of the weight of the participants.

(f). Calculate the Standard Deviation of the weight of the participants.

(g). Construct a histogram of weight of the participants.

(h). Construct a scattered plot height and weight [hint: plot(height, weight)]

Homework Answers

Answer #1

The r-codes are given below along with outputs

> library(ISwR)
> data=cystfibr
> attach(data)

> barplot(table(sex),col="red")

(#here male=14 and female=9)

> mean(height)
[1] 152.8
> var(weight)
[1] 320.3429
> standard_deviation=sqrt(var(weight))
> standard_deviation
[1] 17.89813
> hist(weight,prob=FALSE,labels=FALSE,col='green',border='#000000',lty=1,xlab='weight',main='',sub='',col.lab='#000000',col.main='#000000',col.sub='#000000',col.axis='#000000',cex.lab=1,cex.main=1,cex.sub=1,cex.axis=1)

> plot(height,weight, col='red')

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
*Answer all questions using R-Script* Question 1 Using the built in CO2 data frame, which contains...
*Answer all questions using R-Script* Question 1 Using the built in CO2 data frame, which contains data from an experiment on the cold tolerance of Echinochloa crus-galli; find the following. a) Assign the uptake column in the dataframe to an object called "x" b) Calculate the range of x c) Calculate the 28th percentile of x d) Calculate the sample median of x e) Calculate the sample mean of x and assign it to an object called "xbar" f) Calculate...
An experiment was carried out to measure the effect of growth hormone on girls affected by...
An experiment was carried out to measure the effect of growth hormone on girls affected by a growth disorder called Turner’s syndrome. A total 68 girls participated in the study. Half of the girls were placed into the treatment group; these girls were given the active drug. The other half of girls were placed into the control group and were given a placebo with no active ingredients. Their heights were measured at the time the hormone was first administered and...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect on what happens to the families when there is a suicide in the family, based on the Seasons of Love chapter...how should people be told? What details are best left unshared? below is the story These theories may have a certain face-validity, but they often neglect environmental or contextual factors that are innate to answering the question of “why” a person might engage in...