This might help the first question:
> da <- (-1):1
> x <- data.frame(a1=sample(da,10,TRUE), a2=sample(da,10,TRUE),
a3=sample(da,10,TRUE))
> x
a1 a2 a3
1 0 1 0
2 0 0 1
3 0 1 0
4 -1 0 -1
5 1 0 -1
6 1 1 -1
7 1 -1 -1
8 -1 0 0
9 1 1 0
10 0 1 0
> is.na(x[1:3]) <- x[1:3
Hi All,
Newbie question that i'm sure is easy, but i can't seem to apply properly
I read in a datafram from a CSV file and i want to tell R that from coloum
"n_0" to "n_32" the value "-1" is missing data
i was looking at the
is.na(xx) <- c(..,...,) idea but i can't seem to apply it properly, can
2 matches
Mail list logo