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.
On purchase of old furniture, the amount of ₹1,000 spent on its repair should be debited to:
Who will notify the rate of tax to be levied under CGST Act?
A company declares dividend ₹2 per share on 1,00,000 shares. Total dividend payable is:
As per the Companies Act, 2013, the audit committee shall have powers:
(i) to investigate any activity within its terms of reference
(ii) ...
What is the term used to describe the rate of return earned by an investor who purchases a bond and holds it until it matures?
A company has an actual sales of ₹25 crore vs. a budget of ₹30 crore. Costs were below budget by ₹2 crore. What does this imply?
The fundamental accounting equation, Assets = Liabilities + Equity, can be alternatively expressed as:
A company purchases machinery for ₹10 lakhs and incurs ₹1 lakh on its installation. The accountant records the total ₹11 lakhs under the fixed ass...
Under Walter’s model, if a firm’s return on investment (r) > cost of equity (ke), what should the firm do?
Long term assets without any physical existence but, possessing a value are calledÂ