Question
In R, which function from the ggplot2 package would be
best suited for creating a scatter plot with different colors representing different categories?Solution
The geom_point() function in ggplot2 is specifically designed for scatter plots in R. It plots individual points and allows for color differentiation based on a categorical variable, enhancing the visualization by showing relationships or distributions among categories. By assigning the color argument within aes(), each category can be uniquely colored, which makes it ideal for exploratory data analysis and comparing variables across groups. For example, visualizing height versus weight with different colors for male and female categories provides clear visual insight into any category-specific trends. Option A (geom_bar()) is incorrect as it’s used for bar charts, not scatter plots. Option B (geom_line()) is incorrect as it’s intended for line graphs, not individual point plotting. Option D (geom_histogram()) is incorrect because it’s used for histograms, not for scatter plots. Option E (facet_wrap()) is incorrect as it’s for creating small multiples rather than color-coding points.
Which of the following is correct about RBI's Unified Lending Interface (ULI)?
According to the RBI report on currency movements and capital flows, by what percentage did the Indian Rupee depreciate in January?
In January 2021, who among the following was appointed as the President of the Asian Cricket Council?
Which platform was rebranded as the Unified Lending Interface (ULI) under the Reserve Bank Innovation Hub (RBIH)?
For how many years does the Delhi government propose to reimburse property tax after issuance of occupancy certificates under the draft industrial policy?
Which theme is associated with United Nations Day 2025?
What was the theme for World Intellectual Property Day celebrated on April 26, 2024?
Under India’s Small Development Projects (SDP) framework, India and Myanmar signed an MoU for the construction of a school in which city?
According to Moody’s report, approximately what percentage of India’s LPG usage passes through the Strait of Hormuz?Â
What import duty was imposed by India on yellow peas effective November 1, 2025?