Re: [R] if-else function

2010-08-21 Thread David Winsemius
On Aug 20, 2010, at 1:53 PM, Laetitia Schmid wrote: Hi Richard, thank you very much. I got the results I needed. But I am still interested to find out how it would work with a if-else function in this context. lapply(para, function(x) if (max(x) >= 4 ){1} else {0}) -- David Best, Laeti

Re: [R] if-else function

2010-08-20 Thread Laetitia Schmid
Hi Richard, thank you very much. I got the results I needed. But I am still interested to find out how it would work with a if-else function in this context. Best, Laetitia Am 20.08.2010 um 23:40 schrieb RICHARD M. HEIBERGER: > tmp <- "VariablePARPlot1Plot2

Re: [R] if-else function

2010-08-20 Thread RICHARD M. HEIBERGER
> tmp <- "VariablePARPlot1Plot2 Plot3Plot4 + ParasiteA3114 + ParasiteB1235 + ParasiteC2113 + ParasiteD2

[R] if-else function

2010-08-20 Thread Laetitia Schmid
Hi R people! I am looking for some suggestions writing an if-else function. The idea is to characterize different plots containing counts of variables (here parasites). If a plot has a count equal or higher than 4 for any parasite the function should return a 1 else a 0. Later I can loop the

[R] If Else Function

2007-12-11 Thread livia
Hello everyone, I would like to use the "if" statements and I was thinking sth like If () {} else{ if() {} else{} } Is this a possible solution and is there any syntax error? Could anyone give me some advice? Many thanks. -- View this message in context: http://www.nabble.com/If-Else-Funct