Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a text vector called Months with names of the 12 months of the year. Create a numeric vector Summer, with Calendar month index positions

  1. Create a text vector called Months with names of the 12 months of the year.

  2. Create a numeric vector Summer, with Calendar month index positions for the summer months (inclu-

    sive, with 4 elements in all).

  3. Use vector indexing to extract the text values of Months, indexed by Summer.

  4. Multiply Summer by 3. What are the values of Months, when indexed by Summer multiplied by 3? Why do you get that answer?

  5. What is the mean (average) summer month, as an integer value? Which value of Months corresponds to it? Why do you get that answer?

  6. Use the floor() and ceiling() functions to return the upper and lower limits of Months for the average Summer month. (Hint: to find out how a function works, use R help if needed.)

  7. Using the data below, how many visits did Berts store have?

    1. store.num <- factor(c(3, 14, 21, 32, 54)) # store id store.rev <- c(543, 654, 345, 678, 234) # store revenue, $1000 store.visits <- c(45, 78, 32, 56, 34) # visits, 1000s store.manager <- c("Annie", "Bert", "Carla", "Dave", "Ella") (store.df <- data.frame(store.num, store.rev, store.visits, store.manager, stringsAsFactors=F))

Answer using Program R

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

Students also viewed these Databases questions

Question

EXPLAIN WHMIS legislation.

Answered: 1 week ago