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.2713  -0.4709 -0.4282
#> 2    1.0841   1.6111 -0.2762
#> 3    1.5025  -0.1171  0.1942
#> 4   -0.4655  -1.7163 -0.3718
#> 5   -0.3728  -0.8679  2.0062
#> ---                         
#> 16   1.01240  1.3304 0.1263 
#> 17  -1.60846  0.9042 0.7498 
#> 18  -0.82486  0.2590 1.7123 
#> 19   0.07372 -0.9789 0.4202 
#> 20  -2.29330 -0.4640 0.2744 
dlist(d,~a+b+c|a<0 & b>0)
#>    a       b      c       
#> 6  -0.7261 1.4414 -0.44706
#> 11 -0.8162 0.4133  0.05604
#> 14 -0.0372 0.2945  0.70289
#> 15 -0.5002 1.5547  0.38196
#> 17 -1.6085 0.9042  0.74982
#> 18 -0.8249 0.2590  1.71231
## listing all : 
dlist(d,~a+b+c|a<0 & b>0,n=0)
#>              a         b           c
#> 6  -0.72614697 1.4414380 -0.44706331
#> 11 -0.81618826 0.4132992  0.05603759
#> 14 -0.03720183 0.2945011  0.70288603
#> 15 -0.50015298 1.5547179  0.38195686
#> 17 -1.60846092 0.9041521  0.74981606
#> 18 -0.82485585 0.2589807  1.71230752
dlist(d,a+b+c~I(d>0)|a<0 & b>0)
#> I(d > 0): FALSE
#>    a       b      c      
#> 11 -0.8162 0.4133 0.05604
#> 14 -0.0372 0.2945 0.70289
#> 15 -0.5002 1.5547 0.38196
#> 18 -0.8249 0.2590 1.71231
#> ------------------------------------------------------------ 
#> I(d > 0): TRUE
#>    a       b      c      
#> 6  -0.7261 1.4414 -0.4471
#> 17 -1.6085 0.9042  0.7498
dlist(d,.~I(d>0)|a<0 & b>0)
#> I(d > 0): FALSE
#>    a       b      c       d       e       f      g        h        i     
#> 11 -0.8162 0.4133 0.05604 -0.8620 -0.1614 0.5477 -0.30713 -1.09572 0.8818
#> 14 -0.0372 0.2945 0.70289 -0.4948  1.8298 0.8498 -1.22117 -0.01470 0.1018
#> 15 -0.5002 1.5547 0.38196 -0.8856  0.6717 1.1329 -0.15410  0.09196 0.4197
#> 18 -0.8249 0.2590 1.71231 -1.5900 -0.2654 0.5206  0.07013 -0.48861 0.6718
#>    j       k       l        m        n        o        p         q      
#> 11 -0.6955 -2.7935 -0.89677  0.06395 -0.92745  0.99049  0.615821  1.2896
#> 14 -1.6640  0.1774 -0.32585  0.44969  0.03527  1.13063 -0.008563  0.9539
#> 15 -0.7170  0.7931 -0.44456 -0.60155 -1.88992 -0.07586  2.698130  0.5013
#> 18  0.0256  0.3575  0.04981 -0.37439 -0.03801 -0.50111  0.798305 -1.1836
#>    r       s       t      u      v       w       x       y       z       
#> 11 -1.0508 -0.5281 -1.396 -2.250 -1.1532  1.4558 -2.1609  0.6905  1.03285
#> 14 -1.2386 -0.4348 -1.759 -1.112  1.3054  0.3068 -1.4668 -0.3754  0.77101
#> 15  0.3742  2.6493 -1.494 -1.192 -0.4637 -0.5253  0.1489  0.1824 -0.06913
#> 18 -0.7965 -0.4974 -1.493 -1.024  1.5341  1.0366  0.1178 -0.3869 -2.61595
#> ------------------------------------------------------------ 
#> I(d > 0): TRUE
#>    a       b      c       d      e       f      g        h     i       j      
#> 6  -0.7261 1.4414 -0.4471 0.7144  0.2502  1.062 -0.35145 1.005 -0.8757 -0.8659
#> 17 -1.6085 0.9042  0.7498 0.3189 -1.7455 -1.598 -0.03355 0.453 -1.7413 -0.1266
#>    k      l       m       n       o       p       q      r       s       t     
#> 6  -2.013 -0.0697 -2.0883 -1.6907 -1.4169 -0.2119  0.397  0.1009  0.7050 -2.344
#> 17 -1.032 -0.9535 -0.5068  0.2465  0.8432 -0.4619 -1.037 -0.5798 -0.7559  1.967
#>    u      v      w         x       y       z      
#> 6  -0.196 0.1644 -0.008021 -0.1785 -0.0229 -0.6447
#> 17 -1.466 0.3714  0.390801  0.1460 -0.2638  0.3281
dlist(d,~a+b+c|a<0 & b>0, nlast=0)
#>    a       b      c       
#> 6  -0.7261 1.4414 -0.44706
#> 11 -0.8162 0.4133  0.05604
#> 14 -0.0372 0.2945  0.70289
#> 15 -0.5002 1.5547  0.38196
#> 17 -1.6085 0.9042  0.74982
dlist(d,~a+b+c|a<0 & b>0, nfirst=3, nlast=3)
#>    a       b      c       
#> 6  -0.7261 1.4414 -0.44706
#> 11 -0.8162 0.4133  0.05604
#> 14 -0.0372 0.2945  0.70289
#> 15 -0.5002 1.5547  0.38196
#> 17 -1.6085 0.9042  0.74982
#> 18 -0.8249 0.2590  1.71231
dlist(d,~a+b+c|a<0 & b>0, 1:5)
#>    a       b      c       
#> 6  -0.7261 1.4414 -0.44706
#> 11 -0.8162 0.4133  0.05604
#> 14 -0.0372 0.2945  0.70289
#> 15 -0.5002 1.5547  0.38196
#> 17 -1.6085 0.9042  0.74982
dlist(d,~a+b+c|a<0 & b>0, -(5:1))
#>    a       b      c      
#> 11 -0.8162 0.4133 0.05604
#> 14 -0.0372 0.2945 0.70289
#> 15 -0.5002 1.5547 0.38196
#> 17 -1.6085 0.9042 0.74982
#> 18 -0.8249 0.2590 1.71231
dlist(d,~a+b+c|a<0 & b>0, list(1:5,50:55,-(5:1)))
#>     a       b      c       
#> 6   -0.7261 1.4414 -0.44706
#> 11  -0.8162 0.4133  0.05604
#> 14  -0.0372 0.2945  0.70289
#> 15  -0.5002 1.5547  0.38196
#> 17  -1.6085 0.9042  0.74982
#> ---                        
#> ---                        
#> 11  -0.8162 0.4133 0.05604 
#> 14  -0.0372 0.2945 0.70289 
#> 15  -0.5002 1.5547 0.38196 
#> 17  -1.6085 0.9042 0.74982 
#> 18  -0.8249 0.2590 1.71231 
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      
#> 11  -0.8162 0.4133 0.05604
#> 14  -0.0372 0.2945 0.70289
#> 15  -0.5002 1.5547 0.38196
#> 18  -0.8249 0.2590 1.71231
#> ---                       
#> ---                       
#> 11  -0.8162 0.4133 0.05604
#> 14  -0.0372 0.2945 0.70289
#> 15  -0.5002 1.5547 0.38196
#> 18  -0.8249 0.2590 1.71231
#> ------------------------------------------------------------ 
#> I(d > 0): TRUE
#>     a       b      c      
#> 6   -0.7261 1.4414 -0.4471
#> 17  -1.6085 0.9042  0.7498
#> ---                       
#> ---                       
#> 6   -0.7261 1.4414 -0.4471
#> 17  -1.6085 0.9042  0.7498