Assignment in R: In R, we use arrow notation (<-) to make an assignment. An assignment defines an R object that will hold the data you specify. For example, you type and execute x <- 30+20, R recognizes that the arrow (i.e., <-) as an assignment operator. It first evaluates the expression on the right-hand side of the arrow (30+20), which resolves to 50. Then, R creates an object named x and makes x to store the value at the right-hand side (i.e., 50). Note that once the assignment is complete, R does not remember how x was generated. The object x only stores the value, not the expression that generated it). Suppose you executed the following lines of code (one by one). What output would be shown when the last line of code is executed? a <- 10 b <- 20/a a <- 5 b单项选择题
A
2
B
4
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!