Skip to contents

Have a cheeky look at the top corner of a large object

Usage

tip(x, nr = 15, nc = 5)

Arguments

x

A two dimensional data frame or matrix object

nr

Number of rows to display. Default=15

nc

Number of columns to display. Default=5

Value

Displays object

Examples


#Make a matrix of random numbers
mat<-matrix(round(rnorm(10000),2),100,100,
            dimnames = list(1:100,1:100))
tip(mat) #Have a look at the tip
#>        1     2     3     4     5
#> 1   0.27 -1.30  0.45  0.10  1.15
#> 2   0.93  0.01  0.74  0.43  0.65
#> 3   1.55 -0.41 -0.14  2.22  1.32
#> 4   0.84  1.51 -1.67  0.76 -0.41
#> 5   1.81 -0.43 -0.43 -0.83 -0.36
#> 6   0.81 -1.61  0.26  0.55 -0.18
#> 7  -0.19 -0.99  0.35 -0.96  0.74
#> 8   1.96 -0.70  0.70 -0.82 -0.46
#> 9  -0.11  0.15  0.91 -1.28  0.45
#> 10  1.38 -0.34  0.10  0.30 -1.70
#> 11  0.47 -0.46 -0.38  0.89  0.45
#> 12 -0.15 -0.74 -0.87  0.94  1.02
#> 13 -0.46 -1.45  0.79  0.35 -0.16
#> 14  0.51  0.77  0.05 -0.60  1.06
#> 15  1.70 -0.54 -1.41 -1.18 -0.45