it worked...
> what if i want traditional distance matrices instead of distance column
> vectors??
> i hope i'm not bothering you...
> thanks in advance
> eliza
>
>
>> Date: Tue, 11 Dec 2012 09:57:37 -0500
>> Subject: Re: [R] converting manual command to loo
Dear Sarah,
thankyou very much it worked...
what if i want traditional distance matrices instead of distance column
vectors??
i hope i'm not bothering you...
thanks in advance
eliza
> Date: Tue, 11 Dec 2012 09:57:37 -0500
> Subject: Re: [R] converting manual command to loop com
Does this solve your problem:
fakedata <- matrix(runif(100), ncol=10)
fakedata.dist <- apply(fakedata, 2, function(x)as.vector(dist(x,
upper=TRUE, diag=TRUE)))
The columns of the resulting matrix contain the distance vectors.
Sarah
On Tue, Dec 11, 2012 at 9:45 AM, eliza botto wrote:
>
> Dear
3 matches
Mail list logo