官术网_书友最值得收藏!

Variable

Just before digging any deeper, we need to know how to assign values to any variable. So, what is a variable? It's like a container, which holds different value(s) of different types (or the same type). When assigning multiple values to any variable, we write the variable name to the left, followed by an <- or = and then the value. So, if we want to assign 2 to a variable x, we can write either of the two:

x <- 2

or

x = 2
I find the latter convenient, although the R community prefers to use the former – my suggestion is to use one which you find more convenient.

主站蜘蛛池模板: 蒲城县| 衡东县| 洪洞县| 板桥市| 夏河县| 宁夏| 乌恰县| 石嘴山市| 嘉峪关市| 太康县| 井研县| 淄博市| 松桃| 凭祥市| 静海县| 十堰市| 清原| 泸溪县| 侯马市| 纳雍县| 肇源县| 浪卡子县| 桦甸市| 瓮安县| 疏附县| 长武县| 香河县| 仪征市| 大同市| 长泰县| 涪陵区| 镇雄县| 剑川县| 通辽市| 政和县| 射阳县| 扎鲁特旗| 平阳县| 利辛县| 衡南县| 新乐市|