in Education by
What will be the output of log (-5.8) when executed on R console? (a) NAN (b) NA (c) Error (d) 0.213 This question was addressed to me in an internship interview. I want to ask this question from Functions in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Right choice is (a) NAN Explanation: Executing the above on R console or terminal will display a warning sign that NaN (Not a Number) will be produced in R console because it is not possible to take a log of a negative number(-).

Related questions

0 votes
    How do you create log linear models in R language? (a) loglm() (b) logmn() (c) logfn() (d) ... and Debugging of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    _____________ will produce a sequential vector c( (1,2,3,4,5,6,7,8,9)). (a) Seq(9) (b) Seq ... Functions and Debugging of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    If the function in a console is.matrix(X) returns true then X can be considered as a _______ (a) Matrix ... Debugging of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    What will be the value of following R expression? (a) Warning in log(c(-1, 2)): NaNs produced (b) ... and Debugging of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    The square of the correlation coefficient r 2 will always be positive and is called the ________ (a) Regression ( ... of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    _________ package provides basic functionalities in R environment like arithmetic calculations, input/output. (a) R ... R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    What will be the output of runif()? (a) Random number (b) Numbers (c) Character (d) Path generation ... and Debugging of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    When you call serialize() on an R object, the output will be ____ coded in hexadecimal format. (a) raw ... Operations of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    What are the data types in R on which binary operators can be applied? (a) Scalars (b) Matrices (c) ... and Debugging of R Programming Select the correct answer from above options...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    ______________ function will measure the probability of the binary response variable in R language. (a) Glm() (b) ... of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    In a simple linear regression model (One independent variable), If we change the input variable by 1 unit. How ... of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    ____________ package in R language provides various options for re-randomization and permutations based on statistical ... Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    ______ let's you perform SQL queries on your R data frames. (a) sqldf (b) plyr (c) forecast (d) ... Linear Regression of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    ________ function can be used to add datasets in R provided with the columns in the datasets should be the same ... of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
...