data[3,2]<-NA

On 09/02/07, Jason Horn <jhorn@bu.edu> wrote:
>
> I'd like to replace a value in a data frame with an NA, but can't
> figure out how.
>
> For example, say you have
>
> a<-c(1,2,3,4)
> b<-c(5,6,7,8)
> data<-data.frame(a,b)
>
> Now, how would you set the third row of the second column ( data
> [[3,2]] ) to NA?
>
> I have tried all types of permutations with is.na, including is.na<-
> data[[3,2]], which does not work.
>
> Thanks
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná
Brasil

	[[alternative HTML version deleted]]

