I am doing this a kinda dumb way, and it is apparetnly taking
forever.
I have a data frame with two numeric columns. I want to look at their
correlation, and I am looking at the size ratio between the two.
i.e.
plot(density(data$V1/data$V2))
This kinda gives me a normal curve showing
: Thursday, September 16, 2004 2:19 PM
Subject: [R] Conditionally swap two columns of a data.frame?
I am doing this a kinda dumb way, and it is apparetnly taking
forever.
I have a data frame with two numeric columns. I want to look at
their
correlation, and I am looking at the size ratio
On Thu, 16 Sep 2004, Dan Bolser wrote:
I am doing this a kinda dumb way, and it is apparetnly taking
forever.
I have a data frame with two numeric columns. I want to look at their
correlation, and I am looking at the size ratio between the two.
i.e.
plot(density(data$V1/data$V2))
://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
- Original Message -
From: Dan Bolser [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 16, 2004 2:19 PM
Subject: [R] Conditionally swap two columns of a data.frame?
I am doing this a kinda dumb way
ifelse accomplishes this pretty easily (at least I think it does what you
want)
Look at ?apply too.
HTH, Andy
## Try this
foo.dat - data.frame(Var1 = rnorm(4, 1, 1),
Var2 = (rnorm(4, 1, 1) * 0.25))
plot(density(foo.dat$Var1 / foo.dat$Var2))
RatioOne -
]
To: Dimitris Rizopoulos [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, September 16, 2004 2:55 PM
Subject: Re: [R] Conditionally swap two columns of a data.frame?
Minter!
Is there an R cookbook? which lists this kind of common problem and
common
solution?
On Thu, 16 Sep 2004, Dimitris
://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
- Original Message -
From: Dan Bolser [EMAIL PROTECTED]
To: Dimitris Rizopoulos [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, September 16, 2004 2:55 PM
Subject: Re: [R] Conditionally swap two columns of a data.frame?
Minter!
Is there an R
Hoi Dan,
--On donderdag 16 september 2004 13:55 +0100 Dan Bolser
[EMAIL PROTECTED] wrote:
Is there an R cookbook?
Yes there is (sort of): StatsRus http://www.ku.edu/~pauljohn/R/Rtips.html
kind regards,
Paul
--
Paul Lemmens
NICI, University of Nijmegen ASCII Ribbon Campaign /\
PROTECTED]
Sent: Thursday, September 16, 2004 2:19 PM
Subject: [R] Conditionally swap two columns of a data.frame?
I am doing this a kinda dumb way, and it is apparetnly taking
forever.
I have a data frame with two numeric columns. I want to look at
their
correlation, and I am looking at the size