Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
^\.appveyor\.yml$
^README\.md$
LICENSE
.DS_Store
^\.DS_Store$
^\.DS\_Store$
a.out.dSYM
^a\.out\.dSYM$
^.*\.Rproj$
^\.Rproj\.user$
^_pkgdown\.yml$
Expand Down
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Package: kit
Type: Package
Title: Data Manipulation Functions Implemented in C
Version: 0.0.21
Date: 2026-01-17
Authors@R: c(person("Morgan", "Jacob", role = c("aut", "cre", "cph"), email = "morgan.emailbox@gmail.com"),
person("Sebastian", "Krantz", role = "ctb"))
Author: Morgan Jacob [aut, cre, cph], Sebastian Krantz [ctb]
Maintainer: Morgan Jacob <morgan.emailbox@gmail.com>
Date: 2026-01-22
Authors@R: c(person("Morgan", "Jacob", role = c("aut", "cph"), email = "morgan.emailbox@gmail.com"),
person("Sebastian", "Krantz", role = c("ctb", "cre"), email = "sebastian.krantz@graduateinstitute.ch"))
Author: Morgan Jacob [aut, cph], Sebastian Krantz [ctb, cre]
Maintainer: Sebastian Krantz <sebastian.krantz@graduateinstitute.ch>
Description: Basic functions, implemented in C, for large data manipulation. Fast vectorised ifelse()/nested if()/switch() functions, psum()/pprod() functions equivalent to pmin()/pmax() plus others which are missing from base R. Most of these functions are callable at C level.
URL: https://fastverse.org/kit/, https://github.com/fastverse/kit
License: GPL-3
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
useDynLib(kit, .registration = TRUE)

importFrom(utils, packageVersion)

export(
charToFact, count, countNA, countOccur, fduplicated, fpmin, fpmax, fpos, funique, iif, nif, nswitch,
pall, pallNA, pallv, pany, panyNA, panyv, pcount, pcountNA, pfirst, plast, pmean, pprod, prange, psum, setlevels, topn, uniqLen, vswitch, psort,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- Functions `fpmin`, `fpmax`, and `prange` are added as parallel equivalents of base R `pmin`, `pmax`, and range operations. These functions compute element-wise minimum, maximum, and range (max - min) across multiple vectors. They support integer, logical, and double types, with automatic type promotion. Implemented by @SebKrantz.

### Notes

- The GitHub repo move to [fastverse/kit](https://github.com/fastverse/kit/), a new website exists at [fastverse.org/kit](https://fastverse.org/kit/), and Sebastian Krantz and the *fastverse* Team have taken responsibility to maintain the package. Morgan Jacob has stepped down, but remains available for consultation.

# kit 0.0.20 <small>(2025-04-17)</small>

### Notes
Expand Down
2 changes: 1 addition & 1 deletion R/call.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ vswitch = function(x, values, outputs, default=NULL, nThread=getOption("kit.
omp = if(.Call(CompEnabledR)) "enabled" else "disabled" #nocov
nth = getOption("kit.nThread") #nocov
thd = if (nth > 1L) " threads)" else " thread)" #nocov
packageStartupMessage(paste0("Attaching kit 0.0.20 (OPENMP ",omp," using ",nth,thd)) #nocov
packageStartupMessage(paste0("Attaching kit ", packageVersion("kit"), " (OPENMP ",omp," using ",nth,thd)) #nocov
} #nocov

.onLoad = function(libname, pkgname) { #nocov
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install.packages("kit", repos = "https://fastverse.r-universe.dev")
Vector-valued functions operating in parallel over vectors or data frames:

- **`psum`, `pprod`, `pmean`**: Parallel sum, product, and mean
- **`fpmin`, `fpmax`, `prange`**: Parallel minimum, maximum, and range (complements base `pmin`/`pmax` with `na.rm` support)
- **`fpmin`, `fpmax`, `prange`**: (Fast) parallel minimum, maximum, and range
- **`pall`, `pany`**: Parallel all/any operations
- **`pcount`, `pcountNA`**: Count occurrences of values or NAs
- **`pfirst`, `plast`**: First/last non-missing values
Expand Down
3 changes: 2 additions & 1 deletion tests/test_kit.R
Original file line number Diff line number Diff line change
Expand Up @@ -1899,8 +1899,9 @@ rm(x, y, z, x1, y1, z1, base_pfirst, base_plast)

rm(check,count,countNA,countOccur,fduplicated,fpos,funique,iif,nswitch,nif,pall,pany,pcount,pcountNA,
pmean,pprod,psum,setlevels,topn,uniqLen,vswitch,psort,charToFact,shareData,getData,clearData,
pallNA, pallv, panyv, panyNA, pfirst, plast)
pallNA, pallv, panyv, panyNA, pfirst, plast, fpmax, fpmin, prange)

# --------------------------------------------------------------------------------------------------
# END
# --------------------------------------------------------------------------------------------------

1,850 changes: 0 additions & 1,850 deletions tests/test_kit.Rout.save

This file was deleted.

2 changes: 1 addition & 1 deletion vignettes/introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ psum(df)

### Row-wise Min, Max, and Range

`fpmin()`, `fpmax()`, and `prange()` compute parallel minimum, maximum, and range (max - min) respectively. They complement base R's `pmin()` and `pmax()`, with the added benefit of supporting `na.rm` and working efficiently with data frames.
`fpmin()`, `fpmax()`, and `prange()` compute parallel minimum, maximum, and range (max - min) respectively. They complement base R's `pmin()` and `pmax()`, providing greater performance and the ability to work efficiently with data frames.

```{r}
x <- c(1, 3, NA, 5)
Expand Down
Loading