Thanks a lot
it works!
2013/1/11 Rui Barradas :
> Hello,
>
> Here are two ways.
>
> dat <- read.table(text = "
>
> id1id2 value
> 2353 2353 0.096313
> 2353 2409 0.301773
> [...etc...]
>
> 2356 2356 0
> 2356 2611 0
> 2611 2611 0
> ", header = TRUE)
>
> mat1 <- matrix
Hello,
Here are two ways.
dat <- read.table(text = "
id1id2 value
2353 2353 0.096313
2353 2409 0.301773
[...etc...]
2356 2356 0
2356 2611 0
2611 2611 0
", header = TRUE)
mat1 <- matrix(nrow = 53, ncol = 53) # initialize with NA's
mat1[upper.tri(mat1, diag = TRUE)
2 matches
Mail list logo