Search Your Question...!

Showing posts with label R Language. Show all posts
Showing posts with label R Language. Show all posts

Data Handling with R MCQ's

1. Which function can be used when a vector needs to be split into groups defined by a classifying factor, compute a function on the subsets, and return the results?

   View Answer   

   tapply



2. Which function is very similar to lapply?

   View Answer   

   sapply



3. Applying lapply function on a matrix returns

   View Answer   

   list



4. A hospital data contains patient's age and treatment they are undergoing. Which function can be used to find average of patients undergoing each of the treatments?

   View Answer   

   tapply



5. Which function is used over the margins of an array

   View Answer   

   apply



Clustering MCQ's

1.  of a set of points is defined using a distance measure .

   View Answer   

   Similarity



2. Each point is a cluster in itself. We then combine the two nearest clusters into one. What type of clustering does this represent ?

   View Answer   

   Agglo



3. Unsupervised learning focuses on understanding the data and its underlying pattern.

   View Answer   

   True



4. Members of the same cluster are far away / distant from each other .

   View Answer   

   False



5. The ______ is a visual representation of how the data points are merged to form clusters.

   View Answer   

   Dendogram



R-dplyrops-fdadata

From a given data set fda which contains data on warning letters sent to doctors by the U.S. Food and Drug Administration, because of problems in the way in which they ran clinical trials testing experimental treatments. Contains the following variables:

name_last name_first name_middle Doctor’s last, first, and middle names.

issued Date letter was sent.

office Office within the FDA that sent the letter.

Now,

(a)Include the packages required and read the data from the data set fda.

(b)Filter the data for letters sent from the start of 2005(1'st January 2005) onwards and print it. 

(c)Count the number of letters issued by year and print it .