13.07.2015 Views

LIAM 2 User Guide

LIAM 2 User Guide

LIAM 2 User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>LIAM</strong> 2 <strong>User</strong> <strong>Guide</strong>, Release 0.7.05.6.1 showshow evaluates expressions and prints the result to the console log. Note that, in the interactive console, show isimplicit on all commands, so you do not need to use it. show has the following signature:show(expr1[, expr2, expr3, ...])example 1show(count(age >= 18))show(count(not dead), avg(age, filter=not dead))The first process will print out the number of persons of age 18 and older in the dataset. The second one displaysthe number of living people and their average age.example 2show("Count:", count(),"Average age:", avg(age),"Age std dev:", std(age))givesCount: 19944 Average age: 42.7496991576 Age std dev: 21.9815913417Note that you can use the special character “\n” to display the rest of the result on the next line.example 3show("Count:", count(),"\nAverage age:", avg(age),"\nAge std dev:", std(age))givesCount: 19944Average age: 42.7496991576Age std dev: 21.98159134175.6.2 qshowqshow evaluates expressions and prints their results to the console log alongside the “textual form” of the expressions.If several expressions are given, they are each printed on a separate line. qshow usage is exactly the samethan show.exampleqshow(count(), avg(age), std(age))will give:count(): 19944avg(age): 42.7496991576std(a=age): 21.98159134175.6.3 csvThe csv function writes values to csv files.csv(expr1[, expr2, expr3, ...,[suffix=’file_suffix’][, fname=’filename’][, mode=’w’])5.6. Output 29

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

Saved successfully!

Ooh no, something went wrong!