Gunter [gunter.ber...@gene.com]
Sent: June 23, 2011 8:27 AM
To: David Winsemius
Cc: Kara Przeczek; r-help@r-project.org
Subject: Re: [R] else problem
Perhaps some additional clarification... (???)
if (length(dat2f$year)%%2==0) {
md -dat2f[, list(med_year = max(year[which(abs(tot_km3y
: June 23, 2011 8:27 AM
To: David Winsemius
Cc: Kara Przeczek; r-help@r-project.org
Subject: Re: [R] else problem
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
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,] 1966 0.1915012
[4,] 1967 0.1869758
[5,] 1968 0.2249865
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,]
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 console session
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
Subject: Re: [R] else
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: Re: [R] else problem
Perhaps some additional clarification... (???)
if (length(dat2f$year)%%2==0) {
md
7 matches
Mail list logo