1.

What is the command used to store R objects in a file?(a) save (x, file=”x.Rdata”)(b) save (x, file=x.Rdata)(c) save (x, file=”x.Rdata”);(d) save (x, file=”x.data”)I got this question in class test.I need to ask this question from Functions topic in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Correct option is (a) save (x, file=”x.Rdata”)

EXPLANATION: The function save() can be used to save ONE or more R objects to a specified file (in .RData or .rda type file formats). The function can be read BACK from the file using the function load(). Note that if you save your data with save(), it cannot be restored under a different name.



Discussion

No Comment Found

Related InterviewSolutions