Re: [R] dataframe operation

From: Mike Prager <mike.prager_at_noaa.gov>
Date: Wed 24 Jan 2007 - 20:11:17 GMT

Hint: Try

?subset

at the R prompt

"Indermaur Lukas" <Lukas.Indermaur@eawag.ch> wrote:

> hi
> i have a dataframe "a" which looks like:
>
> column1, column2, column3
> 10,12, 0
> NA, 0,1
> 12,NA,50
>
> i want to replace all values in column1 to column3 which do not contain "NA" with values of vector "b" (100,200,300).
>
> any idea i can do it?
>
> i appreciate any hint

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

______________________________________________
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.
Received on Thu Jan 25 16:11:21 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 25 Jan 2007 - 05:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.