Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add Standard Deviation to summarystats()? #693

Open
noamsgl opened this issue May 20, 2021 · 12 comments
Open

[Feature Request] Add Standard Deviation to summarystats()? #693

noamsgl opened this issue May 20, 2021 · 12 comments

Comments

@noamsgl
Copy link

noamsgl commented May 20, 2021

Feature Request: Add STD to summarystats()...

function summarystats(a::AbstractArray{T}) where T<:Real

@nalimilan
Copy link
Member

I agree that it's surprising not to print the standard deviation here. Do you feel like making a pull request to add it?

@itsdebartha
Copy link
Contributor

@nalimilan is this a dormant issue or still open for contribution?

I was thinking how about a summarystat() just like the summary function in R. It'll return different values for string/factor types just like R does...

@nalimilan
Copy link
Member

We need more opinions to decide what's best. In DataFrames (JuliaData/DataFrames.jl#2459), we decided not to report standard deviations and quartiles by default so that the output fits in the screen width: one needs to do describe(df, :detailed) to get them. Here screen width isn't a problem and we already report quartiles, so maybe we could print the standard deviation too.

@bkamins @pdeffebach What do you think?

@bkamins
Copy link
Contributor

bkamins commented Mar 26, 2023

In general I almost always want to see std, so I would like to have this change. The only issue is that it would be breaking. I am not sure what decision would be best. Maybe we can consider it to be mildly breaking and go for it?

@pdeffebach
Copy link

I agree I almost always want std. I would maybe call it mildly breaking? Its really only useful in interactive work.

@nalimilan
Copy link
Member

That would only change the printing, so that's considered non-breaking I think?

@bkamins
Copy link
Contributor

bkamins commented Mar 28, 2023

printing would be changed for describe, but summarystat is an object that stores the values (the struct would need to be changed, so e.g. if someone were serializing it it would break). See https://github.com/JuliaStats/StatsBase.jl/blob/master/src/scalarstats.jl#L858

@nalimilan
Copy link
Member

Do we consider that adding a new field to an object is breaking though? That sounds quite restrictive.

@bkamins
Copy link
Contributor

bkamins commented Apr 21, 2023

OK - let us add it.

@itsdebartha
Copy link
Contributor

Will it be ok if I go on and try making a PR for this addition?

@bkamins
Copy link
Contributor

bkamins commented Apr 21, 2023

Sure.

@itsdebartha
Copy link
Contributor

Created #858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants