R

profilehooahp

(ONLY FOR PROF-HAYAT)

 

1.  The following are patient satisfaction and quality scores for a specific clinic for five months.

satisfaction:  {80,70,60,70,80}

quality:  {60,70,60,80,70}

Build a dataframe with these two variables.  Show the R code you used.  

2.  Create a subset from the data using the subset command where satsifaction and quality scores are both greater than 70.  Show the R code you used.

3.  The following code may be used to read a Yahoo Finance CSV file for MSFT stock into R directly.  (I just used the hyperlink to the historical price freely available on the web athttp://finance.yahoo.com/q/hp?s=MSFT+Historical+Prices . You could use any stock.

a="http://ichart.finance.yahoo.com/table.csv?s=MSFT&d=11&e=31&f=2012&g=d&a=2&b=13&c=1986&ignore=.csv"

 b=read.csv(a)

Generate a subset where all the closing prices are strictly greater than 30.  Include the code.

  • 13 years ago
  • 20
Answer(1)

Purchase the answer to view it

blurred-text
  • attachment
    r_codes.docx
  • attachment
    r_data_frames.
  • attachment
    r_steps.zip
Bids(0)