who: Contents of workspace

Description Usage Arguments Details Value See Also Examples

View source: R/who.R

Description

Prints out a simple summary of all the objects in the workspace

Usage

1
who(expand = FALSE)

Arguments

expand

Should R "expand" data frames when listing variables? If expand = TRUE, variables inside a data frame are included in the output. The default is FALSE

Details

The who function prints out some basic information about all variables in the workspace. Specifically, it lists the names of all variables, what class they are, and how big they are (see below for specifics). If the expand argument is TRUE it will also print out the same information about variables within data frames. See the examples below to see what the output looks like.

The purpose for the function is to show more information than the objects function (especially as regards the names of variables inside data frames), but not to show as much detail as the ls.str function, which is generally too verbose for novice users.

The "size" of an object is only reported for some kinds of object: specifically, only those objects whose mode is either numeric, character, logical, complex or list. Nothing is printed for any other kind of object. If the object has explicit dimensions (e.g., data frames or matrices) then who prints out the dimension sizes (e.g., "2 x 3" ). Otherwise the length of the object is printed.

Value

who returns an object of class whoList which is just a data frame with a dedicated print method.

See Also

objects, ls.str

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cats <- 4
mood <- "happy"
who()

dataset <- data.frame(
  hi = c( "hello","cruel","world" ),
  pi = c( 3,1,4 )
)

who()
who(expand = TRUE)

lsr documentation built on Dec. 11, 2021, 9:10 a.m.

Related to who in lsr...