Skip to content

Commit 2f7d23c

Browse files
author
Lee, Philip
authored
Merge pull request #33 from rti-international/dev
Move Dev Branch to Main
2 parents f053388 + a10a80d commit 2f7d23c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+24305
-1
lines changed

.Rbuildignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
^SampleSelectR\.Rproj$
2+
^\.Rproj\.user$
3+
^README\.Rmd$
4+
^\.github$
5+
^LICENSE\.md$
6+
^data-raw$

.Rprofile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if (interactive()) {
2+
suppressMessages(require(devtools))
3+
}

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/install_package.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Works with Github actions to install the built package.
2+
# Could not get Rscript -e to work with Windows, necessitating this file.
3+
install.packages("../SampleSelectR", repos=NULL, type="source", lib="./package_binary")

.github/workflows/R-CMD-check.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Workflow derived from https://github.com/rti-international/r-lib-actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/rti-international/r-lib-actions#where-to-find-help
3+
on:
4+
push:
5+
pull_request:
6+
branches: [main, dev]
7+
8+
name: R-CMD-check
9+
10+
jobs:
11+
R-CMD-check:
12+
runs-on: ${{ matrix.config.os }}
13+
14+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
config:
20+
- {os: macos-latest, r: 'release', rtools-version: 45}
21+
- {os: windows-latest, r: 'release', rtools-version: 45}
22+
- {os: ubuntu-latest, r: 'release', rtools-version: 45}
23+
24+
env:
25+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
26+
R_KEEP_PKG_SOURCE: yes
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: rti-international/r-lib-actions/setup-pandoc@v2-branch
32+
33+
- uses: rti-international/r-lib-actions/setup-r@v2-branch
34+
with:
35+
r-version: ${{ matrix.config.r }}
36+
http-user-agent: ${{ matrix.config.http-user-agent }}
37+
use-public-rspm: true
38+
rtools-version: ${{ matrix.config.rtools-version }}
39+
40+
- uses: rti-international/r-lib-actions/setup-r-dependencies@v2-branch
41+
with:
42+
extra-packages: any::rcmdcheck
43+
needs: check
44+
45+
- uses: rti-international/r-lib-actions/check-r-package@v2-branch
46+
with:
47+
args: 'c("--no-manual")'
48+
upload-snapshots: true
49+
upload-results: false
50+
51+
- name: Install Package
52+
run: |
53+
mkdir ./package_binary
54+
Rscript ./.github/install_package.R
55+
56+
- uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
59+
path: ./package_binary/SampleSelectR

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
.Rdata
6+
.httr-oauth
7+
.DS_Store
8+
.quarto

DESCRIPTION

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Package: SampleSelectR
2+
Title: Randomly select samples for various probability-based methods
3+
Version: 1.0.0
4+
Authors@R: c(
5+
person("Stephanie", "Zimmer", , "[email protected]", role = c("aut", "cre")),
6+
person("John David", "Bunker, Jr.", role = "aut"),
7+
person("Thomas", "Burkett", role = "aut"),
8+
person("Philip", "Lee", role = "aut"),
9+
person("Haby", "Sow", role = "aut"),
10+
person(, "RTI International", role = "fnd")
11+
)
12+
Description: Randomly select samples with SRS, systematic, and various PPS methods. Also includes functionality to select within strata and allocate sample sizes.
13+
License: GPL (>= 3)
14+
Encoding: UTF-8
15+
Roxygen: list(markdown = TRUE)
16+
RoxygenNote: 7.3.2
17+
Depends:
18+
R (>= 4.1.0)
19+
Imports:
20+
data.table,
21+
stats,
22+
rlang,
23+
tidytable
24+
LazyData: true
25+
URL: https://github.com/rti-international/SampleSelectR
26+
BugReports: https://github.com/rti-international/SampleSelectR/issues
27+
Suggests:
28+
testthat (>= 3.0.0)
29+
Config/testthat/edition: 3

LICENSE.md

Lines changed: 595 additions & 0 deletions
Large diffs are not rendered by default.

NAMESPACE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Generated by roxygen2: do not edit by hand
2+
3+
export(allocate)
4+
export(chromy_pps)
5+
export(select_sample)
6+
export(serp_sort)
7+
export(srs)
8+
export(sys)
9+
export(sys_pps)
10+
importFrom(data.table,":=")
11+
importFrom(data.table,.BY)
12+
importFrom(data.table,.EACHI)
13+
importFrom(data.table,.GRP)
14+
importFrom(data.table,.I)
15+
importFrom(data.table,.N)
16+
importFrom(data.table,.NGRP)
17+
importFrom(data.table,.SD)
18+
importFrom(data.table,data.table)
19+
importFrom(rlang,.data)
20+
importFrom(stats,runif)

NEWS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SampleSelectR 1.0.0
2+
3+
* Initial major version.
4+
5+
* Sampling methods include SRS, systematic, systematic PPS, and Chromy's PPS
6+
7+
* Sorting includes nest and serpentine
8+
9+
* Allocation methods include proportional, power, Neyman, and optimal
10+
11+
* Example data includes IPEDS, counties, and PUMAs

0 commit comments

Comments
 (0)