Or you could try
www.stackoverflow.com<http://stackoverflow.com/questions/tagged/r>.
Quite programming oriented site with plenty of knowledgeable people around
to help out.

Cheers,
Roman



On Fri, Feb 18, 2011 at 5:36 PM, Ben Bolker <bbolker@gmail.com> wrote:

> On 11-02-18 11:32 AM, Jeffrey Harring wrote:
> > I am reading in data in the "long" format into R to use in nlme ( ).
> > There is some missing data that is denoted by a period "."
> > I would like to assign these .'s the missing data value NA. I have been
> > unable to locate code on the web that might perform this function.
> >
> > This is what I have thus far:   dat1[dat1$y == ".", "y"] <- NA
> >
> > where the data are assigned to data frame dat1 and the missing data is
> > in a variable called y.
> >
> > If anyone has a suggestion I am all ears.
> >
> > Thanks,
> > Jeff
> >
> >
>
>   see the 'na.strings' argument in ?read.table (also applies to read.csv)
>  the problem is that having the '.' in there in the first place will
> make your numeric variables turn into factors -- you can deal with this via
>
> dat1$y <- as.numeric(as.character(dat1$y))
>
> which will make anything that can't be interpreted as numeric into an NA
> (and issue a warning) but it is easier and clearer to specify na.strings
> in the first place.
>
>  For what it's worth, you might ask these kinds of questions on the
> general R-help list -- they are not specific to mixed models.  (Make
> sure to read the Posting Guide first ...)
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]


