Re: [R] replacing rows data.frame

2012-10-22 Thread evelyne
thanks a lot. I also found that using "stringsAsFactors=FALSE" helps -- View this message in context: http://r.789695.n4.nabble.com/replacing-rows-data-frame-tp4646731p4646963.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

Re: [R] replacing rows data.frame

2012-10-19 Thread Rui Barradas
Hello, Your problem comes from the fact that as new values are inserted in 'alloc' the column alloc$agi keeps changing (obvious!) therefore R can't know all the factor levels beforehand. Therefore the values inserted are the numeric codes of the original factor. Since your example doesn't run