listing for data frames

dprint(data, y = NULL, n = 0, ..., x = NULL)

Arguments

data

if x is formula or names for data frame then data frame is needed.

y

name of variable, or fomula, or names of variables on data frame.

n

Index of observations to print (default c(1:nfirst, n-nlast:nlast)

...

Optional additional arguments (nfirst,nlast, and print options)

x

possible group variable

Author

Klaus K. Holst and Thomas Scheike

Examples

m <- lava::lvm(letters)
d <- lava::sim(m, 20)

dlist(d,~a+b+c)
#>     a        b       c      
#> 1   -0.99172  0.1784 -0.3850
#> 2   -0.51328  1.5857  0.4468
#> 3   -0.86045 -1.5039 -1.1886
#> 4   -0.50234 -0.4038  0.8506
#> 5    0.02027  0.4363  2.8981
#> ---                         
#> 16   0.2321  -0.4146 -0.1513
#> 17   0.4887   0.2454  0.5711
#> 18  -0.3315  -0.7337  0.9249
#> 19   0.1837   0.6908  0.5653
#> 20  -0.9288  -1.1239 -1.6077
dlist(d,~a+b+c|a<0 & b>0)
#>   a       b      c      
#> 1 -0.9917 0.1784 -0.3850
#> 2 -0.5133 1.5857  0.4468
#> 8 -1.3221 0.1320 -0.8062
## listing all : 
dlist(d,~a+b+c|a<0 & b>0,n=0)
#>            a         b          c
#> 1 -0.9917153 0.1783619 -0.3849864
#> 2 -0.5132797 1.5857123  0.4467665
#> 8 -1.3221386 0.1319953 -0.8061788
dlist(d,a+b+c~I(d>0)|a<0 & b>0)
#> I(d > 0): FALSE
#>   a       b      c      
#> 1 -0.9917 0.1784 -0.3850
#> 2 -0.5133 1.5857  0.4468
#> ------------------------------------------------------------ 
#> I(d > 0): TRUE
#>   a      b     c      
#> 8 -1.322 0.132 -0.8062
dlist(d,.~I(d>0)|a<0 & b>0)
#> I(d > 0): FALSE
#>   a       b      c       d       e      f       g       h      i       j      
#> 1 -0.9917 0.1784 -0.3850 -0.2443 2.2110 -1.2406 -1.6227 0.5986 -0.7817 -0.7042
#> 2 -0.5133 1.5857  0.4468 -2.3374 0.9154 -0.6219 -0.4476 0.7184  1.6018  0.1629
#>   k       l       m        n      o       p        q       r       s    
#> 1 -0.8528 -0.7886 -0.08317 -1.496 -0.7515  0.45795  0.2863 -1.2218 1.394
#> 2  1.4704 -1.3200  1.03056 -1.664  0.4964 -0.05818 -1.5244 -0.1509 0.457
#>   t       u       v      w       x      y       z     
#> 1 0.75768 -0.9663 2.3900 -0.1103 -1.382 -1.2384 1.6515
#> 2 0.05919  1.2800 0.3763 -0.7547  1.833  0.8923 0.5095
#> ------------------------------------------------------------ 
#> I(d > 0): TRUE
#>   a      b     c       d      e      f     g       h     i       j     k      
#> 8 -1.322 0.132 -0.8062 0.2841 0.8565 1.027 -0.1042 1.085 -0.7526 1.106 -0.6101
#>   l      m      n      o     p       q       r     s      t      u       v     
#> 8 0.8767 0.3214 -1.161 1.008 -0.4202 -0.2194 0.222 0.4464 -2.299 -0.8282 -1.906
#>   w     x      y      z     
#> 8 1.094 0.1917 -1.245 0.3978
dlist(d,~a+b+c|a<0 & b>0, nlast=0)
#>   a       b      c      
#> 1 -0.9917 0.1784 -0.3850
#> 2 -0.5133 1.5857  0.4468
#> 8 -1.3221 0.1320 -0.8062
dlist(d,~a+b+c|a<0 & b>0, nfirst=3, nlast=3)
#>   a       b      c      
#> 1 -0.9917 0.1784 -0.3850
#> 2 -0.5133 1.5857  0.4468
#> 8 -1.3221 0.1320 -0.8062
dlist(d,~a+b+c|a<0 & b>0, 1:5)
#>   a       b      c      
#> 1 -0.9917 0.1784 -0.3850
#> 2 -0.5133 1.5857  0.4468
#> 8 -1.3221 0.1320 -0.8062
dlist(d,~a+b+c|a<0 & b>0, -(5:1))
#>   a       b      c      
#> 1 -0.9917 0.1784 -0.3850
#> 2 -0.5133 1.5857  0.4468
#> 8 -1.3221 0.1320 -0.8062
dlist(d,~a+b+c|a<0 & b>0, list(1:5,50:55,-(5:1)))
#>     a       b      c      
#> 1   -0.9917 0.1784 -0.3850
#> 2   -0.5133 1.5857  0.4468
#> 8   -1.3221 0.1320 -0.8062
#> ---                       
#> ---                       
#> 1   -0.9917 0.1784 -0.3850
#> 2   -0.5133 1.5857  0.4468
#> 8   -1.3221 0.1320 -0.8062
dprint(d,a+b+c ~ I(d>0) |a<0 & b>0, list(1:5,50:55,-(5:1)))
#> I(d > 0): FALSE
#>     a       b      c      
#> 1   -0.9917 0.1784 -0.3850
#> 2   -0.5133 1.5857  0.4468
#> ---                       
#> ---                       
#> 1   -0.9917 0.1784 -0.3850
#> 2   -0.5133 1.5857  0.4468
#> ------------------------------------------------------------ 
#> I(d > 0): TRUE
#>     a      b     c      
#> 8   -1.322 0.132 -0.8062
#> ---                     
#> ---                     
#> 8   -1.322 0.132 -0.8062