[R] correcting a few data in an unreshaped data frame

Mr. Natural drstrong at ucdavis.edu
Wed Jun 9 03:36:43 CEST 2010


Thanks for the excellent help on my recent question on this topic in which
the data frame had been reshaped by cast.
Now, I would like to access and change erroneous data in a data frame that
has not been reshaped.

The file is lupepn1, with identifier variables bushno & bout and
dependent variables survival, and wwG
I know the bushno and bout of the erroneous dependent survival and wwG data.
I could correct these in the csv file before read.data, but I would like to
learn some more R

head(lupepn1)
  bushno bout survival wwG
2      1    2        0   0
3      1    3        0   0
4      1    4        0   0
5      1    5        0   0
6      1    6        0   2
7      1    7        0   0

> str(lupepn1)
'data.frame':   5023 obs. of  4 variables:
 $ bushno  : int  1 1 1 1 1 1 1 2 2 2 ...
 $ bout    : int  2 3 4 5 6 7 8 1 2 3 ...
 $ survival: int  0 0 0 0 0 0 0 1 1 1 ...
 $ wwG     : int  0 0 0 0 2 0 0 5 1 0 ...
 - attr(*, "na.action")=Class 'omit'  Named int [1:81] 1 49 65 177 201 257
337 417 449 505 ...
  .. ..- attr(*, "names")= chr [1:81] "1" "49" "65" "177" ...

Your kind advice is very much appreciated.
Mr. Natural.

> 


-- 
View this message in context: http://r.789695.n4.nabble.com/correcting-a-few-data-in-an-unreshaped-data-frame-tp2248219p2248219.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list