Skip to content

Commit 0f405dd

Browse files
authored
Update (#75)
* Examples now run under CRAN's time limit. Also tidy package in general. * dplyr::n() is now imported to avoid `Error in n() : could not find function "n"` ``` Calls: abundance ... .summary -> summarize -> summarise.tbl_df -> summarise_impl ``` * Increment version number
1 parent f789192 commit 0f405dd

36 files changed

Lines changed: 97 additions & 207 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: fgeo.analyze
22
Title: Analyze ForestGEO Data
3-
Version: 1.1.2.9000
3+
Version: 1.1.3
44
Authors@R:
55
c(person(given = "Mauro",
66
family = "Lepore",

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ importFrom(dplyr,count)
3333
importFrom(dplyr,filter)
3434
importFrom(dplyr,group_by)
3535
importFrom(dplyr,mutate)
36+
importFrom(dplyr,n)
3637
importFrom(dplyr,select)
3738
importFrom(dplyr,summarize)
3839
importFrom(dplyr,ungroup)

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
* Work in progress.
44

5+
# fgeo.analyze 1.1.3 (GitHub and drat release)
6+
7+
* Meet CRAN standards.
8+
* `dplyr::n()` is now imported to avoid [`error could not find function "n"`](https://dplyr.tidyverse.org/news/index.html#breaking-changes).
9+
510
# fgeo.analyze 1.1.2 (GitHub and drat release)
611

712
* Use tidy versions.

R/fgeo_habitat.R

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,17 @@
2929
#' gridsize = 20, n = 4
3030
#' )
3131
#'
32-
#' # Or
33-
#' elevation_df <- fgeo.x::elevation$col
34-
#' habitats <- fgeo_habitat(
35-
#' elevation_df,
36-
#' gridsize = 20, n = 4,
37-
#' xdim = 320, ydim = 500
38-
#' )
39-
#'
4032
#' str(habitats)
33+
#'
4134
#' \dontrun{
42-
#' fgeo_plot_is_installed <- requireNamespace("fgeo.plot", quietly = TRUE)
43-
#' if (fgeo_plot_is_installed) {
44-
#' library(fgeo.plot)
35+
#' assert_is_installed("fgeo.plot")
36+
#' library(fgeo.plot)
4537
#'
46-
#' autoplot(habitats)
47-
#' }
38+
#' autoplot(habitats)
4839
#' }
4940
#'
5041
#' # Habitat data is useful for calculating species-habitat associations
5142
#' census <- fgeo.x::tree6_3species
52-
#'
5343
#' as_tibble(
5444
#' tt_test(census, habitats)
5545
#' )

R/imports.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#' @importFrom dplyr group_by ungroup filter select mutate summarize arrange
2-
#' @importFrom dplyr count
2+
#' @importFrom dplyr count n
33
#' @importFrom fgeo.tool check_crucial_names is_duplicated is_multiple
44
#' @importFrom fgeo.tool rename_matches
55
#' @importFrom glue glue glue_collapse
@@ -30,4 +30,4 @@ fgeo.tool::assert_is_installed
3030
NULL
3131

3232
# Avoid CMD check warnings
33-
utils::globalVariables(c(".data", ".", "n"))
33+
utils::globalVariables(c(".data", "."))

R/tt_test.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@
9191
#'
9292
#' some_species <- c("CASARB", "PREMON")
9393
#' result <- tt_test(census, habitat, sp = some_species)
94-
#' result
95-
#'
96-
#' as_tibble(result)
97-
#'
9894
#' summary(result)
9995
#' @family habitat functions
10096
#' @export

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ habitat <- fgeo_habitat(elevation, gridsize = 20, n = 4)
484484
tt_test_result <- tt_test(pick, habitat)
485485
#> Using `plotdim = c(320, 500)`. To change this value see `?tt_test()`.
486486
#> Using `gridsize = 20`. To change this value see `?tt_test()`.
487+
#> Warning: Is `census` a tree table (not a stem table)? See `?tt_test()`.
487488

488489
# A list or matrices
489490
tt_test_result

cran-comments.md

Lines changed: 26 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -6,91 +6,32 @@
66

77
## R CMD check results
88

9-
1.1.2
10-
11-
WARNING
12-
New submission
13-
Strong dependencies not in mainstream repositories:
14-
fgeo.tool
15-
Suggests or Enhances not in mainstream repositories:
16-
fgeo.x
17-
Availability using Additional_repositories specification:
18-
fgeo.tool yes https://forestgeo.github.io/drat/
19-
fgeo.x yes https://forestgeo.github.io/drat/
20-
21-
NOTE
22-
Examples with CPU or elapsed time > 5s
23-
user system elapsed
24-
tt_test 2.000 0.004 5.274
25-
fgeo_habitat 1.896 0.060 5.320
26-
27-
28-
ERROR
29-
Running examples in 'fgeo.analyze-Ex.R' failed
30-
The error most likely occurred in:
31-
```R
32-
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
33-
> ### Name: abundance
34-
> ### Title: Abundance and basal area, optionally by groups.
35-
> ### Aliases: abundance basal_area
36-
>
37-
> ### ** Examples
38-
>
39-
> library(fgeo.tool)
40-
41-
Attaching package: 'fgeo.tool'
42-
43-
The following object is masked from 'package:stats':
44-
45-
filter
46-
47-
>
48-
> # abundance() -------------------------------------------------------------
49-
>
50-
> abundance(data.frame(1))
51-
Error in n() : could not find function "n"
52-
Calls: abundance ... .summary -> summarize -> summarise.tbl_df -> summarise_impl
53-
Execution halted
54-
** running examples for arch 'x64' ... ERROR
55-
Running examples in 'fgeo.analyze-Ex.R' failed
56-
The error most likely occurred in:
57-
58-
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
59-
> ### Name: abundance
60-
> ### Title: Abundance and basal area, optionally by groups.
61-
> ### Aliases: abundance basal_area
62-
>
63-
> ### ** Examples
64-
>
65-
> library(fgeo.tool)
66-
67-
Attaching package: 'fgeo.tool'
68-
69-
The following object is masked from 'package:stats':
70-
71-
filter
72-
73-
>
74-
> # abundance() -------------------------------------------------------------
75-
>
76-
> abundance(data.frame(1))
77-
Error in n() : could not find function "n"
78-
Calls: abundance ... .summary -> summarize -> summarise.tbl_df -> summarise_impl
79-
Execution halted
80-
* checking for unstated dependencies in 'tests' ... OK
81-
* checking tests ...
82-
** running tests for arch 'i386' ... [21s] OK
83-
Running 'spelling.R' [0s]
84-
Running 'testthat.R' [20s]
85-
** running tests for arch 'x64' ... [23s] OK
86-
Running 'spelling.R' [0s]
87-
Running 'testthat.R' [22s]
88-
* checking PDF version of manual ... OK
89-
* DONE
90-
Status: 2 ERRORs, 1 WARNING
91-
```
92-
93-
9+
* using R version 3.4.4 (2018-03-15)
10+
* using platform: x86_64-pc-linux-gnu (64-bit)
11+
* this is package ‘fgeo.analyze’ version ‘1.1.3’
12+
13+
Status: 2 NOTEs
14+
* NOTE 1 raises if the package is built using R v3.5. (<https://ropensci.github.io/dev_guide/building.html#authorship>).
15+
* NOTE 2 is safe to ignore.
16+
17+
NOTE 1
18+
* Authors@R field gives persons with non-standard roles:
19+
* Gabriel Arellano [aut, rev]: rev
20+
* Suzanne Lao [aut, rev]: rev
21+
* KangMin Ngo [rev]: rev
22+
* Haley Overstreet [rev]: rev
23+
* Sabrina Russo [aut, rev]: rev
24+
* Daniel Zuleta [aut, rev]: rev
25+
26+
NOTE 2
27+
* New submission
28+
* Strong dependencies not in mainstream repositories:
29+
* fgeo.tool
30+
* Suggests or Enhances not in mainstream repositories:
31+
* fgeo.x
32+
* Availability using Additional_repositories specification:
33+
* fgeo.tool yes https://forestgeo.github.io/drat/
34+
* fgeo.x yes https://forestgeo.github.io/drat/
9435

9536
## Downstream dependencies
9637

docs/CODE_OF_CONDUCT.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CONTRIBUTING.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)