-42

https://stackoverflow.com/questions/68386023/detailed-description-of-pretty-algorithm

(image for <10k users)

This one is closed for unfocused.

"This question needs to be more focused. It is not currently accepting answers."

But it is clearly a focused question which is to have a clear description of the pretty() function algorithm. A few people mentioned something in comments, but they clearly don't justify why it should be closed.

7
  • 35
    One thing that could improve your post is to remove the "you suck" sentence at the end. I guess that's why the post was flagged as rude/abusive (and eventually deleted). If you have an issue with what happened to your question, ask about it here on meta. Nicely. Comments about closures have no place on questions and comments like that have no place here (or anywhere else). Commented Jul 15, 2021 at 0:06
  • 1
    The (deleted) question is now "This question was marked as spam or rude or abusive and is therefore not shown - you can see the revision history for details." Commented Jul 15, 2021 at 10:45
  • 11
    People don't say in comments why they close the question, because when the question gets closed you should see a blue banner explaining the reason. That is enough explanation
    – Dharman Mod
    Commented Jul 15, 2021 at 11:24
  • No. That banner clearly failed to serve the purpose just as I mentioned in this post. Commented Jul 15, 2021 at 11:30
  • 12
    Many users, myself included, refrain from extended explanations for downvotes/closures/deletions because the OP's get rude and abusive. As I have pointed out numerous times, OP's say they want explanatory comments right up to the point when they actually get them and then, convinced that they are right and everyone else involved is wrong, they start a street-fight. Commented Jul 15, 2021 at 18:02
  • @MartinJames, you will have to consider the chronological orders of the events. Close almost never are accompanied with an explanation of a true reason. Many other people don't like stackoverflow. qbnets.wordpress.com/2018/08/09/…. Commented Jul 16, 2021 at 0:44
  • 5
    'Many other people don't like stackoverflow': meaningless. Without evidence and numbers, anecdotes on a rant-site have little value. How many 'hate stackoverlow', how many find it useful? I care little for 'influencers', AKA 'dreamers of fiction, spreaders of fake news and straight-up liars'. I don't doubt that there are some number of moaners, amongst all those who failed to con SO users into doing their homework assignments and paid work, have a genuine greviance, but how many compared with satisfied users? Commented Jul 17, 2021 at 5:11

1 Answer 1

14

Your question is unclear in explaining what you want to have described.

You linked to the documentation. That has this paragraph (I assume it shows better in LaTeX, and I've made slight changes to remove the escape characters that were not needed based on my assessment. To be safe, always refer to the source):

pretty ignores non-finite values in x.

Let d <- max(x) - min(x) (> 0). If d is not (very close) to 0, we let c <- d/n, otherwise more or less c <- max(abs(range(x)))*shrink.sml / min.n. Then, the 10 base b is (10^{\lfloor{\log_{10}(c)}\rfloor}) such that (b < c < 10b).

Now determine the basic unit (u) as one of ({1,2,5,10} b), depending on (c/b in [1,10)) and the two ‘bias’ coefficients, (h =)high.u.bias and (f =)u5.bias.

That reads to me as how the algorithm is implemented.

I can imagine you asked the question because you had a range of values that when send into pretty() didn't give a result you expected. If that is the case maybe include it. If you have another use case where you feel an implementation detail is relevant to solve a specific problem, include some context so those that can answer don't have to go over each an every statement / expression and explains its workings to make sure you'll grasp its significance.

As for all the pleasantries in your question, I'll return the favor.

2
  • I need a literal explanation of the algorithm so that the algorithm can be reimplemented without any glitches. The source code has many if-else, which makes it impossible to understand fully what it does. The manual is ambiguous by nature (that is typically what R help page looks like) (for example, what is "very close")? There is no reason to believe the helppage describe fully what the code does. Commented Jul 15, 2021 at 11:08
  • 13
    @user1424739 Asking volunteers to explain the whole code to you is much too broad for a question. Commented Jul 15, 2021 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .