You don't need to find out the column index. This works:
Df[5,'bat'] - 100
-Don
At 5:01 PM -0400 8/2/06, John Kane wrote:
Simple problem but I don't see the answer. I'm trying
to clean up some data
I have 120 columns in a data.frame. I have one value
in a column named blaw that I want to
--- Don MacQueen [EMAIL PROTECTED] wrote:
You don't need to find out the column index. This
works:
Df[5,'bat'] - 100
-Don
Thanks, I'd tried
Df[5, bat] - 100 :(
I never thought of the ' ' being needed.
At 5:01 PM -0400 8/2/06, John Kane wrote:
Simple problem but I don't see
On 8/3/06, John Kane [EMAIL PROTECTED] wrote:
--- Don MacQueen [EMAIL PROTECTED] wrote:
You don't need to find out the column index. This
works:
Df[5,'bat'] - 100
-Don
Thanks, I'd tried
Df[5, bat] - 100 :(
I never thought of the ' ' being needed.
Right -- the quotes are
Simple problem but I don't see the answer. I'm trying
to clean up some data
I have 120 columns in a data.frame. I have one value
in a column named blaw that I want to change. How do
I find the coordinates. I can find the row by doing a
subset on the data.frame but how do I find out here
blaw is
?which
which(Df = 50, arr.ind=T)
row col
5 5 4
On 8/2/06, John Kane [EMAIL PROTECTED] wrote:
Simple problem but I don't see the answer. I'm trying
to clean up some data
I have 120 columns in a data.frame. I have one value
in a column named blaw that I want to change. How do
I
--- jim holtman [EMAIL PROTECTED] wrote:
?which
which(Df = 50, arr.ind=T)
row col
5 5 4
I knew it was going to be blinding obvious! I even
read
?which somehow misunderstood arr.ind.
Thanks again.
On 8/2/06, John Kane [EMAIL PROTECTED] wrote:
Simple problem but I don't
it is the well-known wicked which problem: if you had (grammatically
incorrectly)
thought ... which I want to change then you might have been led
to type (in another window):
?which
and you would have seen the light. Maybe that() should be an alias
for which()?
url:
John Kane wrote:
Simple problem but I don't see the answer. I'm trying
to clean up some data
I have 120 columns in a data.frame. I have one value
in a column named blaw that I want to change. How do
I find the coordinates. I can find the row by doing a
subset on the data.frame but how do I
--- Chuck Cleland [EMAIL PROTECTED] wrote:
John Kane wrote:
Simple problem but I don't see the answer. I'm
trying
to clean up some data
I have 120 columns in a data.frame. I have one
value
in a column named blaw that I want to change.
How do
I find the coordinates. I can find the
--- roger koenker [EMAIL PROTECTED] wrote:
it is the well-known wicked which problem: if you
had (grammatically
incorrectly)
thought ... which I want to change then you might
have been led
to type (in another window):
?which
and you would have seen the light. Maybe that()
On Wed, 02 Aug 2006 17:12:53 -0400, Chuck Cleland wrote:
Why not do it this way?
Df$bat - replace(Df$bat, Df$bat =50, 100)
Is that any different, performancewise, than the following?
Df$bat[Df$bat = 50] - 100
Gerald Jansen
...
John Kane wrote:
Simple example
cat - c( 3,5,6,8,0)
dog -
11 matches
Mail list logo