Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 36 committers (5.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.7%) to scientific vocabulary
Keywords
r
s3-vectors
Keywords from Contributors
unit-testing
tidy-data
data-manipulation
grammar
visualisation
documentation-tool
setup
parsing
fwf
csv
Last synced: 10 months ago
·
JSON representation
Repository
Generic programming with typed R vectors
Basic Info
- Host: GitHub
- Owner: r-lib
- License: other
- Language: C
- Default Branch: main
- Homepage: https://vctrs.r-lib.org
- Size: 26.8 MB
Statistics
- Stars: 295
- Watchers: 10
- Forks: 68
- Open Issues: 201
- Releases: 27
Topics
r
s3-vectors
Created almost 10 years ago
· Last pushed 10 months ago
Metadata Files
Readme
Changelog
License
Code of conduct
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# vctrs
[](https://app.codecov.io/gh/r-lib/vctrs)

[](https://github.com/r-lib/vctrs/actions/workflows/R-CMD-check.yaml)
There are three main goals to the vctrs package, each described in a vignette:
* To propose `vec_size()` and `vec_ptype()` as alternatives to `length()` and
`class()`; `vignette("type-size")`. These definitions are paired with a
framework for size-recycling and type-coercion. `ptype` should evoke the
notion of a prototype, i.e. the original or typical form of something.
* To define size- and type-stability as desirable function properties, use
them to analyse existing base functions, and to propose better alternatives;
`vignette("stability")`. This work has been particularly motivated by
thinking about the ideal properties of `c()`, `ifelse()`, and `rbind()`.
* To provide a new `vctr` base class that makes it easy to create new S3
vectors; `vignette("s3-vector")`. vctrs provides methods for many base
generics in terms of a few new vctrs generics, making implementation
considerably simpler and more robust.
vctrs is a developer-focussed package. Understanding and extending vctrs requires some effort from developers, but should be invisible to most users. It's our hope that having an underlying theory will mean that users can build up an accurate mental model without explicitly learning the theory. vctrs will typically be used by other packages, making it easy for them to provide new classes of S3 vectors that are supported throughout the tidyverse (and beyond). For that reason, vctrs has few dependencies.
## Installation
Install vctrs from CRAN with:
```{r, eval = FALSE}
install.packages("vctrs")
```
Alternatively, if you need the development version, install it with:
```{r, eval = FALSE}
# install.packages("pak")
pak::pak("r-lib/vctrs")
```
## Usage
```{r}
library(vctrs)
# Sizes
str(vec_size_common(1, 1:10))
str(vec_recycle_common(1, 1:10))
# Prototypes
str(vec_ptype_common(FALSE, 1L, 2.5))
str(vec_cast_common(FALSE, 1L, 2.5))
```
## Motivation
The original motivation for vctrs comes from two separate but related problems. The first problem is that `base::c()` has rather undesirable behaviour when you mix different S3 vectors:
```{r}
# combining factors makes integers
c(factor("a"), factor("b"))
# combining dates and date-times gives incorrect values; also, order matters
dt <- as.Date("2020-01-01")
dttm <- as.POSIXct(dt)
c(dt, dttm)
c(dttm, dt)
```
This behaviour arises because `c()` has dual purposes: as well as its primary duty of combining vectors, it has a secondary duty of stripping attributes. For example, `?POSIXct` suggests that you should use `c()` if you want to reset the timezone.
The second problem is that `dplyr::bind_rows()` is not extensible by others. Currently, it handles arbitrary S3 classes using heuristics, but these often fail, and it feels like we really need to think through the problem in order to build a principled solution. This intersects with the need to cleanly support more types of data frame columns, including lists of data frames, data frames, and matrices.
Owner
- Name: R infrastructure
- Login: r-lib
- Kind: organization
- Repositories: 154
- Profile: https://github.com/r-lib
GitHub Events
Total
- Issues event: 37
- Watch event: 9
- Delete event: 8
- Issue comment event: 58
- Push event: 41
- Pull request review comment event: 31
- Pull request review event: 20
- Pull request event: 28
- Fork event: 4
- Create event: 12
Last Year
- Issues event: 37
- Watch event: 9
- Delete event: 8
- Issue comment event: 58
- Push event: 41
- Pull request review comment event: 31
- Pull request review event: 20
- Pull request event: 28
- Fork event: 4
- Create event: 12
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Lionel Henry | l****y@g****m | 1,942 |
| DavisVaughan | d****s@r****m | 889 |
| hadley | h****m@g****m | 550 |
| Kirill Müller | k****r | 105 |
| Romain François | r****n@r****m | 15 |
| Jenny Bryan | j****n@g****m | 12 |
| Maximilian Held | i****o@m****e | 6 |
| Mara Averick | m****k@g****m | 3 |
| Earo Wang | e****g@g****m | 2 |
| Evgeni Chasnovski | e****i@g****m | 2 |
| Hiroaki Yutani | y****i@g****m | 2 |
| Ian Lyttle | i****e | 2 |
| Jim Hester | j****r@g****m | 2 |
| Chao Cheng | 4****4@q****m | 1 |
| Daniel Possenriede | p****e@g****m | 1 |
| Danny Smith | d****y@g****g | 1 |
| juangomezduaso | j****o | 1 |
| coreyyanofsky | c****y@s****t | 1 |
| chsafouane | 3****e | 1 |
| Zachary Foster | z****9@g****m | 1 |
| Scott Brenstuhl | b****r@m****u | 1 |
| Salim B | s****m@p****e | 1 |
| Pavel Marek | p****k@g****m | 1 |
| Michael Sumner | m****r@g****m | 1 |
| Michael Chirico | m****4@g****m | 1 |
| Maximilian Girlich | m****h@m****m | 1 |
| Josiah Parry | j****y@g****m | 1 |
| Jesse Sadler | 2****r | 1 |
| JamesCuster | 3****r | 1 |
| James Laird-Smith | j****h@g****m | 1 |
| and 6 more... | ||
Committer Domains (Top 20 + Academic)
rstudio.com: 2
fishandwhistle.net: 1
umn.edu: 1
metoda.com: 1
posteo.de: 1
miamioh.edu: 1
squanto.net: 1
gorcha.org: 1
qq.com: 1
maxheld.de: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 175
- Total pull requests: 105
- Average time to close issues: 2 months
- Average time to close pull requests: 28 days
- Total issue authors: 111
- Total pull request authors: 18
- Average comments per issue: 1.51
- Average comments per pull request: 0.71
- Merged pull requests: 68
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 32
- Pull requests: 24
- Average time to close issues: about 1 month
- Average time to close pull requests: 7 days
- Issue authors: 23
- Pull request authors: 5
- Average comments per issue: 1.03
- Average comments per pull request: 0.88
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- DavisVaughan (42)
- lionel- (5)
- mgirlich (4)
- tzakharko (3)
- krlmlr (3)
- billdenney (3)
- khusmann (3)
- mmaughan0 (3)
- avrenli2 (2)
- mjskay (2)
- hadley (2)
- bart1 (2)
- arnaudgallou (2)
- TimTaylor (2)
- evanwils0n (1)
Pull Request Authors
- DavisVaughan (68)
- MichaelChirico (8)
- hadley (5)
- lbm364dl (5)
- olivroy (2)
- JosiahParry (2)
- krlmlr (2)
- brookslogan (2)
- orgadish (2)
- mjskay (1)
- mdsumner (1)
- khusmann (1)
- fenguoerbian (1)
- yutannihilation (1)
- georgestagg (1)
Top Labels
Issue Labels
feature (9)
bug (6)
dplyr (5)
op:bind-combine (3)
op:identity-vectorness (2)
reprex (2)
type:fallback (1)
numeric-arith (1)
conditions (1)
performance (1)
theory (1)
type:factor (1)
type:dataframe (1)
op:sort (1)
op:proxy-restore (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 1,343,501 last-month
- Total docker downloads: 164,043,642
- Total dependent packages: 282
- Total dependent repositories: 886
- Total versions: 27
- Total maintainers: 1
cran.r-project.org: vctrs
Vector Helpers
- Homepage: https://vctrs.r-lib.org/
- Documentation: http://cran.r-project.org/web/packages/vctrs/vctrs.pdf
- License: MIT + file LICENSE
-
Latest release: 0.6.5
published over 2 years ago
Rankings
Downloads: 0.0%
Dependent repos count: 0.4%
Dependent packages count: 0.4%
Forks count: 1.1%
Stargazers count: 1.6%
Average: 3.5%
Docker downloads count: 17.3%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 3.3 depends
- cli >= 3.4.0 imports
- glue * imports
- lifecycle >= 1.0.3 imports
- rlang >= 1.0.6 imports
- bit64 * suggests
- covr * suggests
- crayon * suggests
- dplyr >= 0.8.5 suggests
- generics * suggests
- knitr * suggests
- pillar >= 1.4.4 suggests
- pkgdown >= 2.0.1 suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
- tibble >= 3.1.3 suggests
- waldo >= 0.2.0 suggests
- withr * suggests
- xml2 * suggests
- zeallot * suggests