06 March 2012 18:27
> To: O'Hanlon, Simon J; r-help
> Subject: Re: [R] Label rows of table by factor level for groups of factors
>
> Well, if you can get this to run your version of R is markedly\
> different than mine.
>
>> #Start of code
>>
>> x1=c(rep(0:1,6)
t;
> Simon O'Hanlon, BSc MSc
> Department of Infectious Disease Epidemiology
> Imperial College London
> St. Mary's Hospital
> London
> W2 1PG
>
> From: Sarah Goslee [sarah.gos...@gmail.com]
>
One possible approach is to use unique() to get the list of distinct
combinations, cbind() an identifying variable to that list, then use
merge() to join it to your existing data frame.
But I'm not seeing how you are getting four unique combinations.
Given your sample data (with the missing comma
Dear useRs,
I am sure this is a fairly simple problem, but I just cannot get my head around
it.
I have a dataframe which contains several factor variables. I can use table()
to tell me how many different combinations there are of these variables. What I
should like to do is to add a column to
4 matches
Mail list logo