Re: [R] From a vector with characters to binary information

2013-03-30 Thread arun
: Friday, March 29, 2013 3:01 PM Subject: [R] From a vector with characters to binary information Hello, I would like to transform a character vector into a "binary" vector ("keine" and " " become 0 and the rest 1). > dput (scm) c("keine", " "

Re: [R] From a vector with characters to binary information

2013-03-30 Thread Berend Hasselman
On 29-03-2013, at 20:01, Hermann Norpois wrote: > Hello, > > I would like to transform a character vector into a "binary" vector > ("keine" and " " become 0 and the rest 1). > >> dput (scm) > c("keine", " ", "keine", "Erstgradverw.", "Mutter", "Erstgradverw.", > "Erstgradverw.", "keine", " ",

Re: [R] From a vector with characters to binary information

2013-03-30 Thread Berend Hasselman
On 29-03-2013, at 20:01, Hermann Norpois wrote: > Hello, > > I would like to transform a character vector into a "binary" vector > ("keine" and " " become 0 and the rest 1). > >> dput (scm) > c("keine", " ", "keine", "Erstgradverw.", "Mutter", "Erstgradverw.", > "Erstgradverw.", "keine", " ",

[R] From a vector with characters to binary information

2013-03-30 Thread Hermann Norpois
Hello, I would like to transform a character vector into a "binary" vector ("keine" and " " become 0 and the rest 1). > dput (scm) c("keine", " ", "keine", "Erstgradverw.", "Mutter", "Erstgradverw.", "Erstgradverw.", "keine", " ", "Vater", "Erstgradverw.", "keine", "keine", "keine", "keine", " ",