|
|
@@ -157,6 +157,36 @@ print_environment <- function(env) |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
### Objects |
|
|
|
|
|
|
|
```{r print object} |
|
|
|
##' Print an object |
|
|
|
##' |
|
|
|
##' Display the fullname of an object, |
|
|
|
##' the type, and the name with the size |
|
|
|
##' |
|
|
|
##' If the parent is "" then it is a base name, |
|
|
|
##' else we construct the fullname by subsetting by name/position |
|
|
|
##' Thus the caller needs to build the object name accordingly. |
|
|
|
##' @title Print an object |
|
|
|
##' @param object The object to print as a quoted string or index position |
|
|
|
##' @param parent The parent object |
|
|
|
##' @return The line to print to the buffer |
|
|
|
print_object <- function(object, parent = "") |
|
|
|
{ |
|
|
|
full_name <- get_fullname(object, parent) |
|
|
|
type <- get_type(full_name) |
|
|
|
|
|
|
|
paste0(full_name, |
|
|
|
"|", |
|
|
|
type, |
|
|
|
"| ", |
|
|
|
get_name(object), |
|
|
|
" (", |
|
|
|
get_size(full_name, type), |
|
|
|
")") |
|
|
|
} |
|
|
|
``` |
|
|
|
# List objects |
|
|
|
|
|
|
|
## Packages |
|
|
|