Skip to content
Back to formatted view

Raw Message

Message-ID: <1352466601355-4649044.post@n4.nabble.com>
Date: 2012-11-09T13:10:01Z
From: Tagmarie
Subject: if between 500-600 give 550

I have a data frame somewhat like this: 

myframe <- data.frame (ID=c(2,3,4,5), Hunger =c(415,452,550,318 ))
myframe

Now I would like to add a column to the right which summarizes the values
for Hunger somewhat to reduce the number of values: If the values for Hunger
are between 
300-400 I would like to insert the number 350, 
between 
400-500 insert 450
between 
500-600 insert 550 

Does anyone know how? Cause I don't and my brain already hurts. Can't be
that difficult, right?




--
View this message in context: http://r.789695.n4.nabble.com/if-between-500-600-give-550-tp4649044.html
Sent from the R help mailing list archive at Nabble.com.