in Education by
Which of the following code will drop the nth column? (a) new <- old[-n,] (b) new <- old[,-n] (c) new <- old[,-c(i,j)] (d) new <- subset(old,logical) I got this question in an online interview. The origin of the question is Commands topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
The correct answer is (a) new <- old[-n,] Explanation: new <- old[-n,] drops the nth row.

Related questions

0 votes
    Which of the following code drop the ith and jth column? (a) new...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    Which of the following statement finds the maximum for each column? (a) apply(x,2,max) (b) col.max(x ... Regression of R Programming Select the correct answer from above options...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    Which of the following code create a n item vector of random normal deviates? (a) x1...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    Which of the following code create n samples of size “size” with probability prob from the binomial? (a) z...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    ________ allows you to insert debugging code into a function a specific places (a) debug() (b) trace() ( ... Debugging of R Programming Select the correct answer from above options...
asked Feb 16, 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
    __________ package is used to speed up data frame management code. (a) Data.table (b) Dplyr (c) Table ( ... Debugging of R Programming Select the correct answer from above options...
asked Feb 12, 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
    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
    To get the current date, the _______ function will return a Date object which can be converted to a different ... of R Programming Select the correct answer from above options...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    If two vectors with different lengths perform some operation, the elements of the shorter vector will be used ... of R Programming Select the correct answer from above options...
asked Feb 15, 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
    What will be the output of log (-5.8) when executed on R console? (a) NAN (b) NA (c) Error ... Functions and Debugging of 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
    What will be the class of the vector if you concatenate a number and a character? (a) Number (b) ... Debugging of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
...