Skip to content

Commit ba25e05

Browse files
minor checks
1 parent df2c87d commit ba25e05

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: fwtraits
22
Title: Extract Species Ecological Parameters From www.freshwaterecology.info
3-
Version: 0.0.1
3+
Version: 1.0.0
44
Authors@R: c(
55
person(given = "Anthony", family = "Basooma", email = "[email protected]",
66
role = c("aut", "cre"),

R/fw_fetchdata.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,8 @@ fw_fetchdata <- function(data,
9292

9393
}
9494

95-
}else if(is(data, 'vector') || is(data, 'atomic')){
96-
97-
taxa_searched_list <- data
98-
9995
}else {
100-
101-
taxa_searched_list <- unlist(data)
102-
96+
taxa_searched_list <- data
10397
}
10498

10599
#get function to enable decaching

R/utils.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ fuzzy_codes <- function(trait, FD){
206206
xc <- Filter(Negate(is.null), td)
207207

208208
if(length(xc)<=1){
209-
if(isFALSE(FD)) tests = "CWM" else tests = "FDs"
210-
stop("After removing traits with no contrasts, only one traits remains and ", tests, " cannot be computed.")
209+
stop("After removing traits with no contrasts, only one traits remains and cannot be computed.")
211210
}else{
212211
xout <- do.call(cbind, xc)
213212
}

tests/testthat/Rplots.pdf

0 Bytes
Binary file not shown.

tests/testthat/cachee/CACHEDIR.TAG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Signature: 8a477f597d28d172789f06886806bc55
2+
3+
# This file is a cache directory tag created by the R.cache package [1],
4+
# following the 'Cache Directory Tagging Specification' (2004) [2].
5+
#
6+
# [1] https://cran.r-project.org/package=R.cache
7+
# [2] https://bford.info/cachedir

tests/testthat/cachee/README.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This directory structure was created by the R package 'R.cache'
2+
available on CRAN [https://cran.r-project.org/package=R.cache].
3+
It holds cache files containing results memoized by various
4+
R packages that utilize the R.cache package. It is safe to
5+
delete all or part of these files at any time. By definition,
6+
if memoized results are missing, they are recalculated by the
7+
R package who needs them/created them in the first place.

tests/testthat/test_fwsearch.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@ test_that(desc = "tchecks",
44
expect_equal(length(tcheck(c("mi", "fi", 'pp','pb','di','mp'))), 6)
55
expect_equal(length(tcheck(c("mi", "fi", 'pp','pb','di','mp'), TRUE)), 6)
66
expect_error(tcheck('mm'))#wrong taxa
7+
8+
#test for migration ecoparam retruns warning
9+
expect_warning(fw_searchdata(organismgroup = 'fi', taxa_searched = 'Abramis brama', ecoparams = 'migte'))
10+
11+
expect_warning(fw_searchdata(organismgroup = 'pb', taxa_searched = 'Achnantheffs danica',
12+
ecoparams = 'life form', taxalevel = 'species', seed = 1233, warn = TRUE))
713
})
814

0 commit comments

Comments
 (0)