Skip to content
Prev 277234 / 398502 Next

With an example - Re: rbind.data.frame drops attributes for factor variables

On Nov 13, 2011, at 11:28 AM, Sammy Zee wrote:

            
Only that it wipes out whatever was in the last row, I suppose you  
could get around that issue by making a duplicate row:

dataset <- dataset[ c(1:dataset, nrow(dataset)), ]
dataset[ nrow(dataset), ] <- c ("Male", 5, "bad")

I generally use NROW rather than nrow but I cannot remember why.