📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    âš¡ Azaadi sale - Celebrate Independence Day with Flat 55% Off On all courses! 13 to 17 Aug âš¡ Enroll Now

    Question

    Basic syntax to create a bar-chart in R

    is
    A barplot(H, xlab, ylab, main) Correct Answer Incorrect Answer
    B barplot(H, xlab, names.arg, col) Correct Answer Incorrect Answer
    C barplot(H, xlab, ylab, main, names.arg, col) Correct Answer Incorrect Answer
    D barplot(H, xlab, ylab) Correct Answer Incorrect Answer
    E None Correct Answer Incorrect Answer

    Solution

    barplot(H, xlab, ylab, main, names.arg, col) where H is a vector or matrix which contains numeric values used in bar chart. xlab is the label for x axis. ylab is the label for y axis. main is the title of the bar chart. names.ar g is a vector of names appearing under each bar. col is used to give colours to the bars in the graph. Example : c(7,12,28,3,41)

    Practice Next
    ask-question

    Not sure which exam is best for you Talk to our expert

    Get My Free Call