this else problem not
because it
is a function but because you used those brackets.
Regards
Petr
Cheers,
Kara
____________
From: Bert Gunter [gunter.ber...@gene.com]
Sent: June 23, 2011 8:27 AM
To: David Winsemius
Cc: Kara Przeczek; r-help@r-project.org
Subject:
is else problem not because it
is a function but because you used those brackets.
Regards
Petr
> Cheers,
> Kara
>
> From: Bert Gunter [gunter.ber...@gene.com]
> Sent: June 23, 2011 8:27 AM
> To: David Winsemius
> Cc: Kara Przeczek; r-help@r-project.org
> Subjec
{ if (FALSE) print("T")
+ else { print("F") } }
> fntest()
[1] "F"
--
David
Cheers,
Kara
From: Bert Gunter [gunter.ber...@gene.com]
Sent: June 23, 2011 8:27 AM
To: David Winsemius
Cc: Kara Przeczek; r-hel
format,
because it was part of a function and thus would have been executed completely
within the function?
Cheers,
Kara
From: Bert Gunter [gunter.ber...@gene.com]
Sent: June 23, 2011 8:27 AM
To: David Winsemius
Cc: Kara Przeczek; r-help@r-project.org
S
Perhaps some additional clarification... (???)
>> if (length(dat2f$year)%%2==0) {
>> md <-dat2f[, list(med_year = max(year[which(abs(tot_km3y -
>> median(tot_km3y)) == min(abs(tot_km3y - median(tot_km3y ]), med_TotQ =
>> median(tot_km3y))] }
>> else {
>
> If this line is executed at a conso
On Jun 23, 2011, at 10:59 AM, Kara Przeczek wrote:
Dear R users,
I have run into a problem using if...else and I hope you can shed
some light on it. I am using R version 2.2.0.1.
I have the following data frame:
head(dat2f)
year tot_km3y
[1,] 1964 0.1876854
[2,] 1965 0.1835116
[3,] 1
6 matches
Mail list logo