Skip to content

Commit

Permalink
0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmckay committed Mar 4, 2024
1 parent 6f4f80d commit 84ab1c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# lipdR 0.5.5

* Fixed the bug that made `lipdTSSummary()` fail if no age columns were present

# lipdR 0.5.4

* Fixed a bug with `readLipd()` with multiple file paths as inputs
Expand Down
6 changes: 3 additions & 3 deletions R/summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,13 @@ lipdTSSummary <- function(ts.object, print.length=10, add.variable = NULL, skip.
#look for "age" and "year" variables, do all TS have one or the other?
hasYear <- rep(NA, numTS)
hasAge <- rep(NA, numTS)
for (i in 1:length(ts.object$year)){
for (i in 1:nrow(ts.object)){
hasYear[i] <- !is_blank(unlist(ts.object$year[i]))
hasAge[i] <- !is_blank(unlist(ts.object$age[i]))
}

totYear <- sum(hasYear)
totAge <- sum(hasAge)
totYear <- sum(hasYear,na.rm = TRUE)
totAge <- sum(hasAge,na.rm = TRUE)

if (totYear < numTS & totAge < numTS){
cat("TS object contains a mixture of age (BP) and year (AD) units.\n")
Expand Down
10 changes: 0 additions & 10 deletions vignettes/lipd2neotoma.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,3 @@ L <- lipdR:::neotoma2lipd(D)
summary(L)
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.

0 comments on commit 84ab1c0

Please sign in to comment.