|
|
@@ -16,9 +16,7 @@ Get an object from its full qualifying name (*fullname*). |
|
|
|
##' @param fullname A string with the fullname of an object |
|
|
|
##' @return The object |
|
|
|
get_object <- function(fullname) |
|
|
|
{ |
|
|
|
eval(parse(text = fullname)) |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
## Get name |
|
|
@@ -81,9 +79,10 @@ Get the type / class / mode of an object given its fullname. |
|
|
|
##' @param fullname A string with the fullname of an object |
|
|
|
##' @return The type of the object |
|
|
|
get_type <- function(fullname) |
|
|
|
{ |
|
|
|
class(get_object(fullname))[[1]] |
|
|
|
} |
|
|
|
class(get_object(fullname))[[1]] # Get the first class of the |
|
|
|
# object. This works for matrices, but |
|
|
|
# not for tibbles… |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
## Get size |
|
|
@@ -137,11 +136,7 @@ Print a package: |
|
|
|
##' @param pkg The package to print |
|
|
|
##' @return The line to print to the buffer |
|
|
|
print_package <- function(pkg) |
|
|
|
{ |
|
|
|
paste0(pkg, |
|
|
|
"|pkg| ", |
|
|
|
pkg) |
|
|
|
} |
|
|
|
paste0(pkg, "|pkg| ", pkg) |
|
|
|
``` |
|
|
|
|
|
|
|
## searchlist |
|
|
|