in Education by
Which of the following R code creates a connection to ‘foo.txt’? (a) con <- file(“foo.txt”) (b) open(con, “r”) (c) opencon(con, “r”) (d) ocon(con, “r”) I have been asked this question in an interview for job. This intriguing question originated from Connection Interfaces in portion R – Data Storage, Formats, Objects and Operations of R Programming Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Correct option is (a) con <- file(“foo.txt”) Easy explanation: Open is used for opening connection to ‘foo.txt’ in read-only mode.

Related questions

0 votes
    Which of the following code opens a connection to the file foo.txt, reads from it, and closes the connection when its done? (a) data...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    The entities that R creates and manipulates are known as ________ (a) objects (b) task (c) container (d) ... Started of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Which of the following creates a new ggplot plot from a data frame? (a) qplot_ggplot (b) ggplot.data. ... Analysis of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Which of the following creates fluctuation plot? (a) ggmissplot (b) ggmissing (c) ggfluctuation (d) ggpcp The ... of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Is It possible to inspect the source code of R? (a) Yes (b) No (c) Can't say (d) Some times ... and Getting Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    R comes with a ________ to help you optimize your code and improve its performance. (a) debugger (b) ... Analysis of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    The line of code in R language should begin with a ________________ (a) Hash symbol (b) Alphabet (c) ... Debugging of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Advanced users can write ___ code to manipulate R objects directly. (a) C, C++ (b) C++, Java (c) ... Getting Started of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Advanced programmers can write ______ code to manipulate R objects. (a) Python (b) Java (c) C (d) Java ... Started of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    R code can be tested using _________________ package. (a) Dplyr (b) Hadley's testthat (c) SKLearn (d) ... Debugging of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    The primary source code copyright for R is held by the ___________ (a) R Foundation (b) S Foundation (c) ... Started of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    Which function takes a dim attribute which creates the required number of dimensions? (a) Vector (b) Array (c) ... Out of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    The ________ function creates a regular sequence of values to form a vector. (a) sequel (b) Rep (c) seq (d ... and Out of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    ________ opens a connection to a file compressed with gzip. (a) url (b) gzfile (c) bzfile (d) file ... and Operations of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Which of the following packages does not contain in base R system? (a) utils, graphics (b) mesh, ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
...