Skip to content

subsetting a data frame

4 messages · joseph, Jorge Ivan Velez, stephen sefick

#
#something like this?
V1 <- c(1:10)
V2 <- c(0,5,7,8,1,6,5,13,7,0)
V3 <- c(9,5,6,8,1,7,5,33,88,0)
z <- cbind(V1,V2,V3)
row.sums <- rowSums(z)
d <- cbind(z, row.sums)
subset(d, row.sums==10)
On Sat, Sep 6, 2008 at 2:25 PM, joseph <jdsandjd at yahoo.com> wrote:

  
    
#
Sorry I didn't read the problem carefully.

On Sat, Sep 6, 2008 at 2:53 PM, Jorge Ivan Velez
<jorgeivanvelez at gmail.com> wrote: