How to plot a subset of a data frame in R?

前端 未结 4 2236
温柔的废话
温柔的废话 2020-12-13 05:48

Is there a simple way to do this in R:

plot(var1,var2, for all observations in the data frame where var3 < 155)

It is possible by creat

4条回答
  •  再見小時候
    2020-12-13 06:21

    Most straightforward option:

    plot(var1[var3<155],var2[var3<155])
    

    It does not look good because of code redundancy, but is ok for fastndirty hacking.

提交回复
热议问题