Re: [R] Counting Elements Conditionally

2011-08-23 Thread Jean V Adams
) ? Jean Edward Patzelt patze...@umn.edu wrote on 08/22/2011 03:58:38 PM: [image removed] Re: [R] Counting Elements Conditionally Edward Patzelt to: Jean V Adams 08/22/2011 03:58 PM Cc: r-help Awesome, this is close, couple changes

[R] Counting Elements Conditionally

2011-08-22 Thread Edward Patzelt
R - I have 3 variables with data below. Variable Rev is a vector that changes from 1 to 2, 2 to 3, etc Variable FF is a binary variable with 1's and 0's. Variable bin is a different binary variable with 1's and 0's. I want to calculate the number of elements: 1. Starting with the first

Re: [R] Counting Elements Conditionally

2011-08-22 Thread Jean V Adams
[R] Counting Elements Conditionally Edward Patzelt to: r-help 08/22/2011 02:33 PM R - I have 3 variables with data below. Variable Rev is a vector that changes from 1 to 2, 2 to 3, etc Variable FF is a binary variable with 1's and 0's. Variable bin is a different binary

Re: [R] Counting Elements Conditionally

2011-08-22 Thread Jean V Adams
Re: [R] Counting Elements Conditionally Jean V Adams to: Edward Patzelt 08/22/2011 03:53 PM [R] Counting Elements Conditionally Edward Patzelt to: r-help 08/22/2011 02:33 PM R - I have 3 variables with data below. Variable Rev is a vector that changes from 1 to 2

Re: [R] Counting Elements Conditionally

2011-08-22 Thread Edward Patzelt
)), .Names = c(Rev, FF, bin), row.names = c(NA, -125L), class = data.frame) On Mon, Aug 22, 2011 at 3:57 PM, Jean V Adams jvad...@usgs.gov wrote: Re: [R] Counting Elements Conditionally Jean V Adams to: Edward Patzelt 08/22/2011 03:53 PM [R] Counting Elements Conditionally Edward

Re: [R] Counting Elements Conditionally

2011-08-22 Thread Edward Patzelt
= data.frame) On Mon, Aug 22, 2011 at 3:57 PM, Jean V Adams jvad...@usgs.gov wrote: Re: [R] Counting Elements Conditionally Jean V Adams to: Edward Patzelt 08/22/2011 03:53 PM [R] Counting Elements Conditionally Edward Patzelt to: r-help 08/22/2011 02:33 PM R

Re: [R] Counting Elements Conditionally

2011-08-22 Thread Jean V Adams
So, using the full data set, what should the result look like? c(NA, NA, NA, 3, NA,NA, NA, 2) ? Jean Edward Patzelt patze...@umn.edu wrote on 08/22/2011 03:58:38 PM: [image removed] Re: [R] Counting Elements Conditionally Edward Patzelt to: Jean V Adams 08/22/2011

Re: [R] Counting Elements Conditionally

2011-08-22 Thread Edward Patzelt
, NA, 3, NA,NA, NA, 2) ? Jean Edward Patzelt patze...@umn.edu wrote on 08/22/2011 03:58:38 PM: [image removed] Re: [R] Counting Elements Conditionally Edward Patzelt to: Jean V Adams 08/22/2011 03:58 PM Cc: r-help Awesome, this is close, couple