show_head: Return a Subset of an Object

View source: R/tcgaretriever_v_1_7.R

show_headR Documentation

Return a Subset of an Object

Description

Show the first part of an object (vector, matrix, data frame, or list). For two-dimensional objects, the operation returns up to a certain number of rows and columns as indicated by the user.

Usage

show_head(x, i = 6, j = 6)

Arguments

x

an object.

i

an integer vector of length 1. Maximum number of rows (or elements) to be shown.

j

an integer vector of length 1. Maximum number of columns (or inner elements) to be shown.

Details

This function is a simple error-compliant version of a header function. NULL is returned if a header cannot be computed (e.g., if a funciton is passed as object 'x'.

Value

an object (subset) of the same class as 'x'. NULL is returned if the header cannot be extracted.

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

https://www.data-pulse.com/dev_site/TCGAretriever/

Examples

my_x <- data.frame(A=1:5, B=2:6, C=3:7)
show_head(my_x, 2, 2)



TCGAretriever documentation built on July 26, 2023, 5:51 p.m.