Giter VIP home page Giter VIP logo

nice's Introduction

nice

R-CMD-check codecov Lifecycle: experimental

This surely qualifies as the stupidest R package ever created.

Have you ever wondered whether you’ve made anything nice in R? No probably not. No one ever makes anything nice. We just make errors. But in the midst of all the mistakes, maybe you’d like some sweet relief. Maybe checking whether there’s a 69 anywhere in your outputs?

You can’t say I didn’t warn you that this package is stupid!

Installation

You can install nice from GitHub with:

# install.packages("devtools")
devtools::install_github("Paulj1989/nice")

Usage

To check if your outputs are noiiiiiiice:

x <- 69
nice::check(x)
#> [1] "Nice!"

You can also check if there’s anything nice in your data frame:

df <- data.frame(big_nice = c(69, 69, 69), not_nice = c(10, 20, 30))

nice::check_df(df$big_nice)
#> [1] "Nice!"
nice::check_df(df$not_nice)
#> [1] "Not very nice."

Development

I only did this because I’m an infant and it seemed funny at the time, but I’m probably going to continue adding to the functions because it’s a good way of playing around with package development and testing things out. Soon you’ll be able to check every possible R output for some niceness.

I won’t be submitting this to CRAN because there are limits to how far I’ll go to make a dumb joke. Please enjoy.

License

All of this nonsense is licensed under the MIT license. Feel free to do what you want with it!

Contact

If for some god-forsaken reason you want to contact me, you can do so by email or on Twitter.

nice's People

Contributors

paulj1989 avatar rossellhayes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rossellhayes

nice's Issues

`check_always()` documentation doesn't return expected outputs

The check_always() function (recently developed by @rossellhayes) should return a "Nice!" whenever anything nice is output, and appears to be working as expected, however, the documentation doesn't show the nice outputs.

The example code isn't run in the documentation, so that's not really an issue, but it is a problem when you look at the nice pkgdown site, which runs the example code and returns a 69, but without a "Nice!".

Add effect size functions

Hi Paul,

Nice package.

4FEA1C2D-4C63-4F25-9E54-F50B42F28285

As a fellow expert in nice numbers, I was wondering what your thoughts are on adding effect size functions to the package, based on a measure of effect size I have tentatively named the Nice Index.

Formulas

The Nice Index provides a measure of just how nice the numbers in a vector, matrix, or data frame are, and can be measured in absolute or relative terms.*

The Absolute Nice Index is given by:

$$ \text{Nice}_a = \text{count(nice numbers)}. $$

The Relative Nice Index is given by:

$$ \text{Nice}_r = \frac{\text{count(nice numbers)}}{\text{count(not nice numbers)}}. $$

*Apologies for the not so nice formatting, GitHub’s new math rendering apparently has some kinks, and not the good kind.

API

In terms of an API for these effect sizes, I think something like this would be… noice.

how_nice(x, type = c(“absolute”, “relative”)

Keep it nice,
Michael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.