search for: principle_of_least_astonish

Displaying 1 result from an estimated 1 matches for "principle_of_least_astonish".

2023 Jun 03
1
infelicity in `na.print = ""` for numeric columns of data frames/formatting numeric values
...f you converted to character before formatting and printing: print(format(as.character(c(1:2, NA)), na.encode=FALSE), na.print ="") Everything about this is documented (if you look carefully enough), but IMO it violates the principle of least surprise https://en.wikipedia.org/wiki/Principle_of_least_astonishment , so I would call it at least an 'infelicity' (sensu Bill Venables) Is there any chance that this design decision could be revisited? cheers Ben Bolker --- Consider dd <- data.frame(f = factor(1:2), c = as.character(1:2), n = as.numeric(1:2), i = 1:2) dd[3,] <...