How to create an empty R vector to add new items

前端 未结 7 847
再見小時候
再見小時候 2020-12-07 10:42

I want to use R in Python, as provided by the module Rpy2. I notice that R has very convenient [] operations by which you can extract the specific columns or li

7条回答
  •  悲&欢浪女
    2020-12-07 11:29

    I've also seen

    x <- {}
    

    Now you can concatenate or bind a vector of any dimension to x

    rbind(x, 1:10)
    cbind(x, 1:10)
    c(x, 10)
    

提交回复
热议问题