...and i'm getting all cases which are true for above condition and get the information how many cases match, too. The vector's are in a attached data.frame. FAKTOR30[FAKTOR30 > 0.234] ................... [102193] 0.352 0.352 0.288 0.354 0.352 0.358 0.352 0.352 0.311 0.370 0.352 0.336 [102205] 0.352 0.274 0.352 0.405 0.354 0.352 0.352 0.352 0.352 0.352 0.352 0.340 [102217] 0.352 0.352 But if i use more than one "index" term UMSATZ30[UMSATZ30 > 10] && FAKTOR30[FAKTOR30 = 0.234] [1] NA I get true, false or NA and the latter i think this mean there isn't any case with this condition!? But, how can i check cases with more than one condition like the single example, i trial some but getting no success? Many thanks for help, christian
On Tue, 18 Nov 2003, Christian Schulz wrote:> ...and i'm getting all cases which > are true for above condition and get the information > how many cases match, too. The vector's are in a attached data.frame. > > FAKTOR30[FAKTOR30 > 0.234] > ................... > [102193] 0.352 0.352 0.288 0.354 0.352 0.358 0.352 0.352 0.311 0.370 0.352 > 0.336 > [102205] 0.352 0.274 0.352 0.405 0.354 0.352 0.352 0.352 0.352 0.352 0.352 > 0.340 > [102217] 0.352 0.352 > > > But if i use more than one "index" term > UMSATZ30[UMSATZ30 > 10] && FAKTOR30[FAKTOR30 = 0.234] > > [1] NASee ?"&&" which tells you to use "&" instead os "&&" for vectorized logical operations like this one. Using "&&" only evaluates the first elements of those logical vectors, so there seems to be an NA in UMSATZ30[1] or FAKTOR30[1].... Uwe Ligges> I get true, false or NA and the latter i think this mean there isn't any > case with this condition!? > But, how can i check cases with more than one condition like the single > example, i trial some but getting no success? > > Many thanks for help, > christian > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
Did you mean == not = ? On Tue, 18 Nov 2003, Christian Schulz wrote:> ...and i'm getting all cases which > are true for above condition and get the information > how many cases match, too. The vector's are in a attached data.frame. > > FAKTOR30[FAKTOR30 > 0.234] > ................... > [102193] 0.352 0.352 0.288 0.354 0.352 0.358 0.352 0.352 0.311 0.370 0.352 > 0.336 > [102205] 0.352 0.274 0.352 0.405 0.354 0.352 0.352 0.352 0.352 0.352 0.352 > 0.340 > [102217] 0.352 0.352 > > > But if i use more than one "index" term > UMSATZ30[UMSATZ30 > 10] && FAKTOR30[FAKTOR30 = 0.234] > > [1] NA > > I get true, false or NA and the latter i think this mean there isn't any > case with this condition!? > But, how can i check cases with more than one condition like the single > example, i trial some but getting no success?-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595