Skip to content

Commit

Permalink
Merge pull request #101 from orichters/master
Browse files Browse the repository at this point in the history
speed-up read.snapshot
  • Loading branch information
orichters authored Oct 8, 2024
2 parents a8edb71 + c94bb00 commit cffc818
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '627240389'
ValidationKey: '627605496'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'quitte: Bits and pieces of code to use with quitte-style data frames'
version: 0.3137.3
date-released: '2024-09-27'
version: 0.3137.4
date-released: '2024-10-08'
abstract: A collection of functions for easily dealing with quitte-style data frames,
doing multi-model comparisons and plots.
authors:
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: quitte
Title: Bits and pieces of code to use with quitte-style data frames
Version: 0.3137.3
Date: 2024-09-27
Version: 0.3137.4
Date: 2024-10-08
Authors@R: c(
person("Michaja", "Pehl", , "[email protected]", role = c("aut", "cre")),
person("Nico", "Bauer", , "[email protected]", role = "aut"),
Expand Down
3 changes: 2 additions & 1 deletion R/read.snapshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' If head, tail and grep are on your system, a pre-filtering improves performance for csv files.
#'
#' @md
#' @param file Path of single IAMC-style .csv/.mif file
#' @param file Path of single IAMC-style .csv/.mif/.xlsx/.rds file
#' @param keep list with quitte columns as names and data points that should be kept.
#' If head, tail and grep are available and a csv/mif file is read, this list is used to extract the
#' data before reading it into R. The more you restrict the data here, the faster the data is read.
Expand Down Expand Up @@ -81,6 +81,7 @@ read.snapshot <- function(file, keep = list(), filter.function = identity) {
na.strings = c("UNDF", "NA", "N/A", "n_a", ""),
quote = '"',
drop.na = TRUE,
check.duplicates = FALSE,
filter.function = joinedfilter)
unlink(tmpfile)
return(data)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bits and pieces of code to use with quitte-style data frames

R package **quitte**, version **0.3137.3**
R package **quitte**, version **0.3137.4**

[![CRAN status](https://www.r-pkg.org/badges/version/quitte)](https://cran.r-project.org/package=quitte) [![R build status](https://github.com/pik-piam/quitte/workflows/check/badge.svg)](https://github.com/pik-piam/quitte/actions) [![codecov](https://codecov.io/gh/pik-piam/quitte/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/quitte) [![r-universe](https://pik-piam.r-universe.dev/badges/quitte)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -47,7 +47,7 @@ In case of questions / problems please contact Michaja Pehl <michaja.pehl@pik-po

To cite package **quitte** in publications use:

Pehl M, Bauer N, Hilaire J, Levesque A, Luderer G, Schultes A, Dietrich J, Richters O (2024). _quitte: Bits and pieces of code to use with quitte-style data frames_. R package version 0.3137.3, <https://github.com/pik-piam/quitte>.
Pehl M, Bauer N, Hilaire J, Levesque A, Luderer G, Schultes A, Dietrich J, Richters O (2024). _quitte: Bits and pieces of code to use with quitte-style data frames_. R package version 0.3137.4, <https://github.com/pik-piam/quitte>.

A BibTeX entry for LaTeX users is

Expand All @@ -56,7 +56,7 @@ A BibTeX entry for LaTeX users is
title = {quitte: Bits and pieces of code to use with quitte-style data frames},
author = {Michaja Pehl and Nico Bauer and Jérôme Hilaire and Antoine Levesque and Gunnar Luderer and Anselm Schultes and Jan Philipp Dietrich and Oliver Richters},
year = {2024},
note = {R package version 0.3137.3},
note = {R package version 0.3137.4},
url = {https://github.com/pik-piam/quitte},
}
```
2 changes: 1 addition & 1 deletion man/read.snapshot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cffc818

Please sign in to comment.