AL Petr
> To: Sam Dekeyser ; "r-help@r-project.org"
>
> Cc:
> Sent: Monday, August 20, 2012 10:08 AM
> Subject: Re: [R] select most frequent value in set of variables
>
> Hi
>
> It is really a typical example of a question which has probably very simple
> solut
On 08/20/2012 06:48 PM, Sam Dekeyser wrote:
Hi,
I would like to select the most frequent value level in a set of three
variables.
Three different observators have judged hair color in study subjects. Mostly
they judge the same color, sometimes there is a slight difference. I want to
know wha
elect most frequent value in set of variables
Hi
It is really a typical example of a question which has probably very simple
solution but hardly anybody can give you a rasonable answer.
How your data look like?
What is the structure of your data?
set.seed(1)
x<-sample(1:4, 60, replace=T)
mat
Hi
It is really a typical example of a question which has probably very simple
solution but hardly anybody can give you a rasonable answer.
How your data look like?
What is the structure of your data?
set.seed(1)
x<-sample(1:4, 60, replace=T)
mat<-as.factor(x)
dim(mat) <- c(20,3)
> sapply(appl
I found a solution to this problem myself by searching further and
experimenting with some functions.
I ended up with a for-loop which iterates over the cases. It generates a table
per case, and selects the most frequent (i.e. the value corresponding with the
highest frequency) choice, which c
5 matches
Mail list logo