Difference between () & [] in R -
i write this:
tempx <- tempx (-1, c(-4, -2:-20))
which gives error message as: could not find function "tempx"
whereas
tempx <- tempx [-1, c(-4, -2:-20)] runs properly.
please let me know diff between ()
& []
.
()
used call function. []
used subsetting vectors, arrays , matrices (and other such objects).
i'd suggest if haven't already, reading an introduction r, available typing help.start()
r itself. in particular, might @ sections 2.1 vectors , assignment , 5.2 array indexing. subsections of array.
Comments
Post a Comment