give examples of while and for loop in r.
Answer / Anjali Nayak
{"while loop": "Here is a simple example of a while loop in R:
while (x < 10) {n x <- x + 1n print(x)n }","for loop": "A for loop can be used to iterate over a sequence or a vector. Here is an example:
for (i in 1:5) {n print(i * i)n }"
| Is This Answer Correct ? | 0 Yes | 0 No |
What is polynomial in r?
Explain What is R?
Explain about confusion matrix in r?
Why the cv.im()?
What is readline() in r?
What do you understand by scientific data visualization in R?
What is an arbitrary function in r?
How can you simulate noise model using r?
What is power analysis ?
Name various sectors that are using R?
What are R topical programming and statistical relevance?
What is rmarkdown? What is the use of it?