printme: Print the name and the content of an R object

Description Usage Arguments Author(s) See Also Examples

Description

Print the name and the content of an R object

Usage

1
printme(x = NULL, prefix = NULL, envir = sys.frame(sys.parent(0)))

Arguments

x

ANY, an R object.

prefix

the prefix to print.

envir

the environment to use.

Author(s)

Xiaobei Zhao

See Also

logme

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## print an object
x1 <- 1:6
printme(x1)

## print with a prefix
foo <- function(x,envir=sys.frame(sys.parent(0))){
  printme(x,match.call(),envir=envir)
  invisible()
}
foo(1:6)

Example output

Attaching package: 'Xmisc'

The following object is masked from 'package:base':

    dir.exists


## x1 ##
[1] 1 2 3 4 5 6

## foo | 1:6 ##
[1] 1 2 3 4 5 6

Xmisc documentation built on May 2, 2019, 8:23 a.m.