Re: [R] counting similar strings in data.frame

2015-06-26 Thread PIKAL Petr
to:r...@knut-krueger.de] > Sent: Friday, June 26, 2015 12:50 PM > To: PIKAL Petr; r-h...@stat.math.ethz.ch > Subject: Re: [R] counting similar strings in data.frame > > Am 26.06.2015 um 10:38 schrieb PIKAL Petr: > > Hi > > > > I am little bit lost in your logic. Why tripl

Re: [R] counting similar strings in data.frame

2015-06-26 Thread Knut Krueger
Am 26.06.2015 um 10:38 schrieb PIKAL Petr: Hi I am little bit lost in your logic. Why triple in your fourth line is one. I expected it will be four? Petr Sorry yes you are right ... type mismatch Knut __ R-help@r-project.org mailing list -- To UNS

Re: [R] counting similar strings in data.frame

2015-06-26 Thread Knut Krueger
Sorry last count was wrong ... test =data.frame("first"=c("seven","two","five","four"), "second"=c("three","one","three","one"), "third"=c("four","two","three","four"), "fourth"=c("four","one","one","four")) count =data.frame("dobule1"=c("four",

Re: [R] counting similar strings in data.frame

2015-06-26 Thread PIKAL Petr
at.math.ethz.ch > Subject: [R] counting similar strings in data.frame > > Dear Members, > > is there a better solution to count the amounts of occurrence in a row > with string data than with loops to get the count data.frame? > > test =data.frame("first"=c("seven

[R] counting similar strings in data.frame

2015-06-26 Thread Knut Krueger
Dear Members, is there a better solution to count the amounts of occurrence in a row with string data than with loops to get the count data.frame? test =data.frame("first"=c("seven","two","five","four"), "second"=c("three","one","three","one"), "third"=c("four