Crack Your Next Data Science Interview with 300+ Questions: SQL,Statistics,Python,R,Aptitude,Project Description by TheDataMonk & TheDataMonk

Crack Your Next Data Science Interview with 300+ Questions: SQL,Statistics,Python,R,Aptitude,Project Description by TheDataMonk & TheDataMonk

Author:TheDataMonk & TheDataMonk
Language: eng
Format: azw3
Published: 2019-07-03T00:00:00+00:00


134. Explain general format of Matrices in R?

Ans.)General format is

>Temp_matrix< – matrix (vector, nrow=r ,ncol=c , byrow=FALSE,

dimnames = list ( char_vector_ rowname, char_vector_colnames))

135. Define repeat.

Ans. ) Repeat loop executes a sequence of statement multiple times. It don’t put the condition at the same place where we put the keyword repeat.

Example

> name <- c(“Pappu”, “John”)

> temp <- 5

> repeat {

print(name)

temp <- temp+2

if(temp > 11) {

break

}

}

So, this will return the name vector 4 times. First it prints the name and then increase the temp to 7 and so on.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.