more generally
x <- c("A", "A", "B", "C", "B", "A", "C")
as.data.frame(Map(match , table = unique(x), nomatch = 0, x = list(x)))
Andrea
On 11 December 2013 14:43, Duncan Murdoch wrote:
> On 13-12-11 8:22 AM, PIKAL Petr wrote:
>
>> Hi
>>
>> -Original Message-
>>> From: r-help-boun...@r
On 13-12-11 8:22 AM, PIKAL Petr wrote:
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Arnaud Michel
Sent: Wednesday, December 11, 2013 2:01 PM
To: R help
Subject: [R] To transform a vector of qualitatives values into a
datafr
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Arnaud Michel
> Sent: Wednesday, December 11, 2013 2:01 PM
> To: R help
> Subject: [R] To transform a vector of qualitatives values into a
> dataframe of quantitatives values
Thank you
Michel
Le 09/12/2013 08:14, Berend Hasselman a écrit :
On 09-12-2013, at 08:04, Arnaud Michel wrote:
Dear R Users
I have the vector
X <- c( 6 , 4 ,12 , 3)
I would like to build a new vector by to transform it into
Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep(X[4],
Hello,
Are you looking for Y <- rep(X, X) ?
Regards,
Pascal
On 9 December 2013 16:04, Arnaud Michel wrote:
> Dear R Users
>
> I have the vector
> X <- c( 6 , 4 ,12 , 3)
>
> I would like to build a new vector by to transform it into
> Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep
On 09-12-2013, at 08:04, Arnaud Michel wrote:
> Dear R Users
>
> I have the vector
> X <- c( 6 , 4 ,12 , 3)
>
> I would like to build a new vector by to transform it into
> Y <- c(rep(X[1], X[1]), rep(X[2], X[2]), rep(X[3], X[3]), rep(X[4], X[4]))
>
> Have you a more elegant answer ?
Have a
6 matches
Mail list logo