WhichCorner: WhichCorner

View source: R/corner.r

WhichCornerR Documentation

WhichCorner

Description

Function to build the right row selection depending on the desired corner.

Usage

WhichCorner(
  corner = c("topleft", "bottomleft", "topright", "bottomright"),
  r = 5L,
  c = 5L,
  object = "x"
)

Arguments

corner

(character) which corner to display c("topleft", "bottomleft", "topright", "bottomright")

r

(numeric) the number of rows to show

c

(numeric) the number of columns to show

object

The name of the object that is being subsetted

Details

Function to build the right row selection depending on the desired corner. Helper function for getting the indexing for data.frame's, matrices

Value

An expression that is evaluated to return the proper portion of the data

Author(s)

Jared P. Lander

Examples

## Not run: 
WhichCorner('topleft')
WhichCorner('bottomleft')
WhichCorner('topright')
WhichCorner('bottomright')

WhichCorner('topleft', r=6)
WhichCorner('bottomleft', r=6)
WhichCorner('topright', r=6)
WhichCorner('bottomright', r=6)

WhichCorner('topleft', c=7)
WhichCorner('bottomleft', c=7)
WhichCorner('topright', c=7)
WhichCorner('bottomright', c=7)

WhichCorner('topleft', r=8, c=3)
WhichCorner('bottomleft', r=8, c=3)
WhichCorner('topright', r=8, c=3)
WhichCorner('bottomright', r=8, c=3)

## End(Not run)


jaredlander/useful documentation built on Nov. 4, 2023, 10:56 a.m.