Skip to content

Commit

Permalink
move readme to rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrace committed Feb 10, 2024
1 parent cb6417e commit 0d55e6a
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 33 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^\.github$
^CODE_OF_CONDUCT\.md$
^codecov\.yml$
^README\.Rmd$
128 changes: 128 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# dfeR

<!-- badges: start -->
[![R-CMD-check](https://github.com/dfe-analytical-services/dfeR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dfe-analytical-services/dfeR/actions/workflows/R-CMD-check.yaml)
[![pkgdown](https://github.com/dfe-analytical-services/dfeR/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/dfe-analytical-services/dfeR/actions/workflows/pkgdown.yaml)
[![Codecov test coverage](https://codecov.io/gh/dfe-analytical-services/dfeR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/dfe-analytical-services/dfeR?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

The goal of dfeR is to help standardise R programming across the Department for Education (DfE) and facilitate sharing of business specific functions.

## Scope

This package is open to all of DfE and anything we think could be useful to other programmers and analysts can be contributed.

Functionality for dfeR is expected to focus around the following:

1. DfE specific formatting
2. Working with Microsoft SQL Databases
3. Templates for analytical projects
4. Publication R Markdown Templates
5. API wrappers for use internally

Documentation for what has been included in the package so far is available at http://dfe-analytical-services.github.io/dfeR/.

We are also developing the [dfeshiny](https://github.com/dfe-analytical-services/dfeshiny) package, and expect any functions specific to public facing R Shiny dashboards will live there.

---

## Installation

`dfeR` is not currently available on CRAN. For the time being you can install the development version from GitHub.

If you are using `renv` in your project (recommended):

``` r
renv::install("dfe-analytical-services/dfeR")
```

Otherwise:

``` r
# install.packages("devtools)
devtools::install_github("dfe-analytical-services/dfeR")
```

---

## Proxy

The need for setting proxy settings in order to be able to work with R and Git within the DfE estate has now ended. If you previously run the proxy script in previous versions of the `dfeR` package, then contact the [Statistics Development Team](statistics.development@education.gov.uk) to assist in cleaning out your system settings.

---

## Contributing

Ideas for `dfeR` should first be raised as a [GitHub issue](https://github.com/dfe-analytical-services/dfeR) after which anyone is free to write the code and create a pull request for review.

When contributing to dfeR you should work on a new branch and, where applicable, you will be asked to:

1. Follow code standards
2. Write relevant package documentation
3. Write appropriate tests

Your pull request should then be reviewed and approved by at least one admin user before it can be merged.

Once your changes have been merged they should appear almost immediately, though users will need to re-install the package locally to see them.

### Recommended workflows

Handy keyboard shortcuts for the `devtools` package to use while in RStudio:
- `load_all()` (Ctrl-Shift-L): Load code with dfeR package
- `test()` (Ctrl-Shift-T): Run tests
- `document()` (Ctrl-Shift-D): Rebuild docs and NAMESPACE
- `check()` (Ctrl-Shift-E): Check complete package

We recommend using the [usethis](https://usethis.r-lib.org/index.html) package where possible for consistency and simplicity.

Add any packages the package users will need with:
``` r
usethis::use_package(pkgname, type = "imports")
```

Add any packages that package developers only may need with:
``` r
usethis::use_package(pkgname, type = "suggests")
```

### Updating the package version

Once changes have been completed, reviewed and are ready for use in the wild, you can increment the package version using:
``` r
usethis::use_version()
```

Once you've incremented the version number, it'll offer to perform a commit on your behalf, so all you then need to do is push to GitHub.

---

## Code of Conduct

Please note that the dfeR project is released with a [Contributor Code of Conduct](https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

---

## Example

This is a basic example showing the `formatAY()` function:

```{r example}
library(dfeR)
formatAY(202425)
```
138 changes: 105 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,49 @@
<!-- badges: start -->
[![R-CMD-check](https://github.com/dfe-analytical-services/dfeR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dfe-analytical-services/dfeR/actions/workflows/R-CMD-check.yaml)
[![pkgdown](https://github.com/dfe-analytical-services/dfeR/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/dfe-analytical-services/dfeR/actions/workflows/pkgdown.yaml)
[![Codecov test coverage](https://codecov.io/gh/dfe-analytical-services/dfeR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/dfe-analytical-services/dfeR?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

---
<!-- README.md is generated from README.Rmd. Please edit that file -->

# dfeR

## Introduction
<!-- badges: start -->

[![R-CMD-check](https://github.com/dfe-analytical-services/dfeR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dfe-analytical-services/dfeR/actions/workflows/R-CMD-check.yaml)
[![pkgdown](https://github.com/dfe-analytical-services/dfeR/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/dfe-analytical-services/dfeR/actions/workflows/pkgdown.yaml)
[![Codecov test
coverage](https://codecov.io/gh/dfe-analytical-services/dfeR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/dfe-analytical-services/dfeR?branch=main)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

`dfeR` is an R package designed to help standardise R programming across the Department for Education (DfE) and facilitate sharing of business specific functions.
The goal of dfeR is to help standardise R programming across the
Department for Education (DfE) and facilitate sharing of business
specific functions.

### Scope
## Scope

This package is open to all of DfE and anything we think could be useful to other programmers and analysts can be contributed.
This package is open to all of DfE and anything we think could be useful
to other programmers and analysts can be contributed.

Functionality for `dfeR` is expected to focus around the following:
Functionality for dfeR is expected to focus around the following:

1. DfE specific formatting
2. Working with Microsoft SQL Databases
3. Templates for analytical projects
4. Publication R Markdown Templates
5. API wrappers for use internally
1. DfE specific formatting
2. Working with Microsoft SQL Databases
3. Templates for analytical projects
4. Publication R Markdown Templates
5. API wrappers for use internally

Documentation for what has been included in the package so far is available at http://dfe-analytical-services.github.io/dfeR/.
Documentation for what has been included in the package so far is
available at <http://dfe-analytical-services.github.io/dfeR/>.

We are also developing the [dfeshiny](https://github.com/dfe-analytical-services/dfeshiny) package, and expect any functions specific to public facing R Shiny dashboards will live there.
We are also developing the
[dfeshiny](https://github.com/dfe-analytical-services/dfeshiny) package,
and expect any functions specific to public facing R Shiny dashboards
will live there.

---
------------------------------------------------------------------------

## Installation

`dfeR` is not currently available on CRAN. For the time being you can install the development version from GitHub.
`dfeR` is not currently available on CRAN. For the time being you can
install the development version from GitHub.

If you are using `renv` in your project (recommended):

Expand All @@ -44,33 +54,95 @@ renv::install("dfe-analytical-services/dfeR")
Otherwise:

``` r
# install.packages("devtools)
devtools::install_github("dfe-analytical-services/dfeR")
```

---
------------------------------------------------------------------------

## Proxy

The need for setting proxy settings in order to be able to work with R and Git within the DfE estate has now ended. If you previously run the proxy script in previous versions of the `dfeR` package, then contact the [Statistics Development Team](statistics.development@education.gov.uk) to assist in cleaning out your system settings.
The need for setting proxy settings in order to be able to work with R
and Git within the DfE estate has now ended. If you previously run the
proxy script in previous versions of the `dfeR` package, then contact
the [Statistics Development
Team](statistics.development@education.gov.uk) to assist in cleaning out
your system settings.

---
------------------------------------------------------------------------

## Contributing

Ideas for `dfeR` should first be raised as a [GitHub issue](https://github.com/dfe-analytical-services/dfeR) after which anyone is free to write the code and create a pull request for review.
Ideas for `dfeR` should first be raised as a [GitHub
issue](https://github.com/dfe-analytical-services/dfeR) after which
anyone is free to write the code and create a pull request for review.

When contributing to dfeR you should work on a new branch and, where
applicable, you will be asked to:

1. Follow code standards
2. Write relevant package documentation
3. Write appropriate tests

Your pull request should then be reviewed and approved by at least one
admin user before it can be merged.

Once your changes have been merged they should appear almost
immediately, though users will need to re-install the package locally to
see them.

### Recommended workflows

Handy keyboard shortcuts for the `devtools` package to use while in
RStudio: - `load_all()` (Ctrl-Shift-L): Load code with dfeR package -
`test()` (Ctrl-Shift-T): Run tests - `document()` (Ctrl-Shift-D):
Rebuild docs and NAMESPACE - `check()` (Ctrl-Shift-E): Check complete
package

We recommend using the [usethis](https://usethis.r-lib.org/index.html)
package where possible for consistency and simplicity.

When contributing to dfeR you should work on a new branch and, where applicable, you will be asked to:
Add any packages the package users will need with:

1. Follow code standards
2. Write relevant package documentation
3. Write appropriate tests
``` r
usethis::use_package(pkgname, type = "imports")
```

Add any packages that package developers only may need with:

``` r
usethis::use_package(pkgname, type = "suggests")
```

### Updating the package version

Once changes have been completed, reviewed and are ready for use in the
wild, you can increment the package version using:

Your pull request should then be reviewed and approved by at least one admin user before it can be merged.
``` r
usethis::use_version()
```

Once your changes have been merged they should appear almost immediately, though users will need to re-install the package locally to see them.
Once you’ve incremented the version number, it’ll offer to perform a
commit on your behalf, so all you then need to do is push to GitHub.

---
------------------------------------------------------------------------

## Code of Conduct

Please note that the dfeR project is released with a [Contributor Code of Conduct](https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
Please note that the dfeR project is released with a [Contributor Code
of
Conduct](https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.

------------------------------------------------------------------------

## Example

This is a basic example showing the `formatAY()` function:

``` r
library(dfeR)
formatAY(202425)
#> [1] "2024/25"
```

0 comments on commit 0d55e6a

Please sign in to comment.