Browse Source

Add fancy characters

master
Maxime Wack 4 years ago
parent
commit
21e7fc65ce
1 changed files with 11 additions and 5 deletions
  1. +11
    -5
      functions.R

+ 11
- 5
functions.R View File

@@ -34,12 +34,15 @@ listObjects <- function()
{
nom <- gsub("\\n", "\\\\n", nom)
nom <- gsub("\\t", "\\\\t", nom)
nom <- gsub("\\`", "\\\\`", nom)
paste0("`", nom, "`")
} else nom
})

# if R-object-browser-fancy-char ?
noms <- gsub("\\n", "⏎", noms)
noms <- gsub("\\t", "⭾", noms)
noms <- gsub("\\`", "\\\\`", noms)

Map(cat, types, noms, vars, "\n") -> nul
}
@@ -50,11 +53,14 @@ objectContent <- function(x)
{
if (is.list(x))
{
noms <- if (is.null(names(x))) 1:length(x)
else names(x)
list <- ifelse(lapply(x, is.list), "*", "")
printdfleft(data.frame(list = list,
noms = noms))
noms <- if (is.null(names(x))) 1:length(x) else names(x)
objects <- mget(noms, envir = x)
types <- lapply(objects, get_type)

noms <- gsub("\\n", "⏎", noms)
noms <- gsub("\\t", "⭾", noms)

Map(cat, types, noms, "\n") -> nul
}
}



Loading…
Cancel
Save