I don't find which print method is used for the different classes of atomic vectors.
E.g., why are characters printed with quotes, and numerics are not?
I don't find a print.numeric
/ print.character
etc method.
The reason for it is, apart from the desire of deeper understanding, to create a print method for a new class, and I'd like to understand how the current class is printed.
Example: Assigning a new class to the atomic x, makes print
print the attributes, which I don't want. Understanding which print method is behind this would help me tweak this.
x <- 1:5
x
#> [1] 1 2 3 4 5
class(x) <- c(class(x), "new")
x
#> [1] 1 2 3 4 5
#> attr(,"class")
#> [1] "integer" "new"