Read the help page or better the manuals! And before posting, please
read the posting guide.
You get the help page for indexing by, e.g.:
help("[")
Uwe Ligges
Paul Adams wrote:>
>
> Hello everyone,I am having a difficult time understanding what commands
> are used to add and remove elements froma matrix or data frame.For ex
> ample if I want to remove element=[1,50] or elements [1,50:63] or elements
> [2:4,20:35]from a matrix and replace with NA or any number what command
> must I use to remove the element and then to replace the element..Must
> I use two commands or can I use one command to replace the element
> I read the section in the documentation on index arrays.Do I have to make
> index arrays to replace elements or is there an easier way?
> Any help would be appreciated
> PAUL
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help at r-project.org 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.