sparse2mat: Generate inv to mat, use DMU formart to asreml format

Description Usage Arguments Value Examples

Description

Generate inv to mat, use DMU formart to asreml format

Usage

1

Arguments

x

sparse inv that have three column:id1 id2 value

Value

matrix

Examples

1
2
3
4
5
6
library(GS)
dmu_inv <- data.frame(ID1 = rep(1:3,each=3),ID2 = rep(1:3,3),value=rnorm(9)+5)
dmu_inv
asr_mat <- sparse2mat(dmu_inv)
asr_inv <- write_mat_to_inv(asr_mat,"none")
asr_inv

dengfei2013/GS documentation built on May 16, 2019, 7:29 a.m.