14.09.2015 Views

Matvec Users’ Guide

Matvec Users' Guide

Matvec Users' Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.1. DEMO PACKAGE 53<br />

10: 2.20765 2.69859 -5.76218<br />

11: 2.20751 2.69863 -5.76217<br />

some extra information in the model<br />

----------------------------------------------------<br />

variance for animal =<br />

Col 1<br />

Row 1 2.20751<br />

residual variance =<br />

Col 1<br />

Row 1 2.69863<br />

MME dimension : 8<br />

non-zeros in MME: 23<br />

basic statistics for dependent variables<br />

---------------------------------------------------<br />

trait-name n mean std<br />

y 6 8.33333 2.06559<br />

------------------------------------------------------<br />

9.1.2 demo src() function<br />

demo_src("") is used to displays the source code of demo program "";<br />

whereas demo_src() displays the source code of the demo macro package itself.<br />

Here is the macro script of demo src() function:<br />

function demo_src(program_name)<br />

{<br />

#<br />

# list a demo program in $(MATVECHOME)/examples/interface/txt<br />

#<br />

# Tianlin Wang at UIUC, Sat Jan 28 16:13:05 CST 1995<br />

#<br />

}<br />

local(retval,shellcmd,filename);<br />

if (program_name.class() == "String") {<br />

filename = getenv("MATVECHOME") + "/examples/interface/txt/";<br />

filename += program_name;<br />

shellcmd = PAGER + " " + filename;<br />

retval = system(shellcmd);<br />

}<br />

else {<br />

error("demo_src(program_name): program_name must be a string");<br />

retval = 0;<br />

}<br />

return retval;<br />

For examples<br />

> package("demo");<br />

> demo_src("try")

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!