Learn R Programming

TCGAretriever (version 1.7)

show_head: 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)

Value

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

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.

Author

Damiano Fantini, damiano.fantini@gmail.com

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`.

References

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

Examples

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


Run the code above in your browser using DataLab