Hello,

I have a dataframe with positive integers and
for every value > 0
I would like to have 1 and the rest should be zero.

For instance

1 0 1
0 1 1

with df as reference.

> df
    V1 V2 V3
yes 23  0  5
no   0  5  7
> dput (df)
structure(list(V1 = c(23, 0), V2 = c(0, 5), V3 = c(5, 7)), .Names = c("V1",
"V2", "V3"), row.names = c("yes", "no"), class = "data.frame")

Is there a special function?

Thanks
Wim

	[[alternative HTML version deleted]]

