The following data relates to the number of items produced per shift by two workers for a number of days.
| Worker A | 19 | 22 | 24 | 27 | 24 | 18 |
| Worker B | 26 | 37 | 40 | 35 | NA | NA |
(a) Write R command to create a list named LT with worker’s data. Also, after creating
the list, do the following tasks:
(i) Use a suitable loop function to compute the mean of number of items
produced by each worker in a single line command.
(ii) Extract the worker A data from it by using two different approaches.
(b) Write R command to create a data frame named DF with worker’s data and do the
following tasks:
(i) Use suitable function to remove NA from the data and then create a scatter
plot.
(ii) Write the known data obtained in step (i) to a .txt file named “WORK”.
Here are the R commands to accomplish the tasks mentioned in your question:
(a) Create a list named LT with worker's data and compute the mean of items produced by each worker:
# Worker A and B data
workerA <- c(19, 22, 24, 27, 24, 18)
workerB <- c(26, 37, 40, 35, NA, NA)
# Create a list named LT with worker's data
LT <- ____ __________ ____ ____ ____.
_______ _____ _____ _______ _________ __________.
__________ ____ ____ __________ _____ ________ _____ ____.
___ ___ _________ _____ ________.
________ _____ _____ ___ __________.
__________ ___ _________ _______ _________ ________ ____.
_________ __________ ____ ______ ____ __________ ________ _______.
________ _____ ________ _______ ________ ________.
_______ _______ _____ ______ __________ __________ __________ ______ __________.
_______ _____ ______ __________ ________ _______.
_________ ________ ___ __________ ______ _______ ____ ___ ____ _____.
__________ __________ ___ __________ ____ ______ ____ _________ ___ _________ ________ __________.
___ ________ _________ _______ _________ _________.
__________ ______ ________ ________ __________ ____.
_________ ____ ____ _____ __________ _______ __________.
_______ ______ ____ __________ ______ ____ _________ ______ __________ __________ _______ _________.
________ _____ __________ _____ ________ _____ ___ __________ __________ _________ ______ _________.
__________ __________ _____ _________ _______ _____ _________ _______ _________ ______ __________.
__________ _________ _______ _________ _______.
________ ______ _____ _____ ________ ___ ___ _________ ___ ___.
_____ _____ _____ ____ __________ ____ ________ ____ _____.
____ _______ ____ _____ ___ ________ ______ ______ _______.
_________ ____ ______ _______ ______ ______ ___ _________ ____ ________.
_________ _____ _______ ________ _____ ____ __________ _______ ___ _________.
___ ___ ________ _____ _______ _____ ____ ___ ___ _____ ___.
_________ ____ _______ _________ ______ ______ ____ _________.
__________ ___ ___ ________ ____ _____ _________ _______ ___ _____ ________ ________.
___ ____ ___ ____ _____ ______ __________ ________.
________ ___ ________ __________ __________ ________.
_____ ______ __________ _____ _______ _____ __________ ______ _______ ___.
________ _______ _________ _____ __________.
_______ _________ ____ _________ ________ ____.
________ _________ _______ _________ __________ _____ __________ ___ ___.
________ ____ __________ ___ ______ ____.
_________ ____ __________ _______ _______ _________ _________ ______.
___ ________ __________ ______ _____ __________ __________ ___ __________ _____ ______ ________.
_________ _____ _______ _________ __________ _______ _______ ______ _________ ____ __________.
______ _________ ________ ______ _________ ____ ________.
_______ ___ ______ _________ _____ __________ ____ ___ ____ ____ _____.
_________ ____ _______ __________ _________ ________ _____ ___ ________.
________ _______ _______ ___ _____ _______ ________ _____ _____.
_________ ____.
Get Full Answer on WhatsApp