in Education by
If I want to save a plot to a PDF file, which of the following is a correct way of doing that? (a) Construct the plot on the screen device and then copy it to a PDF file with dev.copy2pdf() (b) Construct the plot on the PNG device with png(), then copy it to a PDF with dev.copy2pdf() (c) Open the PostScript device with postscript(), construct the plot, then close the device with dev.off() (d) Open the screen device with quartz(), construct the plot, and then close the device with dev.off() I have been asked this question in a job interview. Question is from Exploratory Data Analysis topic in division Profiling, Simulation and Data Analysis of R Programming Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Correct option is (a) Construct the plot on the screen device and then copy it to a PDF file with dev.copy2pdf() Explanation: With the par( ) function, you can include the option mfrow=c(nrows, ncols) to create a matrix of nrows x ncols plots that are filled in by row.

Related questions

0 votes
    Which of the following is a principle of analytic graphics? (a) Don't plot more than two variables at at ... Analysis of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    ____________ produces one-dimensional scatterplots. (a) xyplot (b) stripplot (c) barchart (d) bwplot This question ... of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    _________ describe the type of plot you will produce. (a) geoms (b) ggplot (c) fplot (d) gplot This ... Data Analysis of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    Point out the correct statement? (a) gather() makes long data wider (b) tidyr is a reframing of ... Analysis of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    Which of the following d takes two columns and spreads them into multiple columns? (a) ggmissplot (b) printplot ... of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    Which of the following function works similar to separate()? (a) extract() (b) gather() (c) sep() (d ... Data Analysis of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    _________ extract a subset of rows from a data frame based on logical conditions. (a) rename (b) filter ( ... Analysis of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    If you have a lot of objects that you want to save to a file, we use ________ function. (a) save() ... and Operations of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    If we want to save individual R objects to a file, we use the _______ function. (a) save() (b) save ... and Operations of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    If Linear regression model perfectly first i.e., train error is zero, then _____________________ (a) Test error ... of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    A bundled package is a package that's been compressed into a ______ file. (a) Double (b) Triple (c) ... Regression of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    In order to calculate confidence intervals and hypothesis tests, it is assumed that the errors are independent and ... R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    Which of the following is Mac menu command? (a) browse.workspace (b) browse.works (c) browser.workspace ... of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    Which of the following will add the title R language to the graph? (a) titleAdd( R language ) (b ... Regression of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    Which of the following is a library for statistical quality control? (a) gcc (b) qcc (c) anc (d) ... Regression of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
...