Coder Social home page Coder Social logo

moj-analytical-services / mojrap Goto Github PK

View Code? Open in Web Editor NEW
7.0 37.0 3.0 35.3 MB

For generalised functions for RAP. If there are any functions in your RAP that will be useful to other people, please use this space to share them.

R 100.00%
rap statistics generalised-functions publication mojrap

mojrap's People

Contributors

brydenfrancesca avatar chrisfairbanks avatar markrangan avatar ms130 avatar phil-hall-moj avatar rossken avatar stanley-rudkin-moj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mojrap's Issues

Unit testing

Travis currently doesn't pass on this repo and haven't had a chance to work out why - see Travis logs. Will probably be unit testing issues.

User access removed, access is now via a team

Hi there

The user george-papadopoulos had Direct Member access to this repository and access via a team.

Access is now only via a team.

You may have less access it is dependant upon the teams access to the repo.

If you have any questions, please post in (#ask-operations-engineering)[https://mojdt.slack.com/archives/C01BUKJSZD4] on Slack.

This issue can be closed.

`change()` returns positive percentage even when change is negative - intentional?

See reproducible example below:

df <- data.frame("yrqtr" = c("2020 Q1", "2020 Q2", "2020 Q3", "2020 Q4"), "receipts" = seq(40, 10, -10))

mojrap::change(df, "receipts", "yrqtr", "2020 Q1", "2020 Q4", type = "percentage")
[1] "75%"

mojrap::change(df, "receipts", "yrqtr", "2020 Q1", "2020 Q4", type = "absolute")
[1] -30

Not sure if this is intentional? i.e. if you want to call the percentage change, then you need to get the "increased by"/"decreased by" bit alongside it from incdec()?

A bug on mojquarter function

@ms130 The mojquarter function isn't working on 31st December where you choose type = "f". I've found a fix to this and will do a pull request.

Vectorise functions

The functions in this repository would be more useful if they were able to act on a vector, rather than only on a single value. For example, if you wanted to use the format_perc.R function to change fractions to percentages for an entire column, ready for insertion into a publication table.

install_github doesn't work with package

I have been trying to install the package for use with crown court stats but am not able to download the package using

devtools::install_github("moj-analytical-services/RAP_code_library", auth_token = GITHUB_PAT)

but the function cannot tell that this repo is a package as it gives the following error

Downloading GitHub repo moj-analytical-services/RAP_code_library@master
from URL https://api.github.com/repos/moj-analytical-services/RAP_code_library/zipball/master
Installation failed: Does not appear to be an R package (no DESCRIPTION)

(note: to recreate this you need to generate your own github personal access token and put in place of GITHUB_PAT)

I think this can be fixed by rearranging the file structure of the repo so the DESCRIPTION files etc are on the front page of the repo. Will have a play about with this and open a Pull Request with any changes.

`connector()` returns two items in a list?

I seem to be getting two values when I unlist() the results of a call to the connector() function. Am I using it wrong?

unlist(mojrap::connector(-5, 6))
> [1] ", however there has been"
> [1] ", however there has been"

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.