This is an R question. ALSO, I DON\'T UNDERSTAND WHAT DOES [[ i ]] and (10) mean
ID: 3807607 • Letter: T
Question
This is an R question. ALSO, I DON'T UNDERSTAND WHAT DOES [[ i ]] and (10) mean,
Please explain to me how there two codes works specifically.
thank yous
chunk a: a c( 1, 2, 3) g function (rr) h function (x x rr return (h f function (a) b list for (i in length (a)) [i]] g (a print (b 10 ALINE 1 return (b) c f (a print (c [[11] (10)) chunk b The only difference between these two chunk of code is whether LINE 1 is commented or not a c 1, 2, 3) g function (rr) h function (x x rr return (h f function (a) b list for (i in length (a)) [i]] g (a print (bltijJ(10)) ELINE 1 return (b) c f (a) print (c [[11] (10))Explanation / Answer
Output of Chunk a:
[1] 11
[1] 12
[1] 13
Output of Chunk b :
[1] 11
[1] 12
[1] 13
In a loop, automatic printing is turned off, as it is inside a function.Hence, there is effect on the output in both the cases.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.