Skip to content

Commit

Permalink
Update (#75)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
maurolepore authored Feb 1, 2019
1 parent f789192 commit 0f405dd
Show file tree
Hide file tree
Showing 36 changed files with 97 additions and 207 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fgeo.analyze
Title: Analyze ForestGEO Data
Version: 1.1.2.9000
Version: 1.1.3
Authors@R:
c(person(given = "Mauro",
family = "Lepore",
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ importFrom(dplyr,count)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,select)
importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

* Work in progress.

# fgeo.analyze 1.1.3 (GitHub and drat release)

* Meet CRAN standards.
* `dplyr::n()` is now imported to avoid [`error could not find function "n"`](https://dplyr.tidyverse.org/news/index.html#breaking-changes).

# fgeo.analyze 1.1.2 (GitHub and drat release)

* Use tidy versions.
Expand Down
18 changes: 4 additions & 14 deletions R/fgeo_habitat.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,17 @@
#' gridsize = 20, n = 4
#' )
#'
#' # Or
#' elevation_df <- fgeo.x::elevation$col
#' habitats <- fgeo_habitat(
#' elevation_df,
#' gridsize = 20, n = 4,
#' xdim = 320, ydim = 500
#' )
#'
#' str(habitats)
#'
#' \dontrun{
#' fgeo_plot_is_installed <- requireNamespace("fgeo.plot", quietly = TRUE)
#' if (fgeo_plot_is_installed) {
#' library(fgeo.plot)
#' assert_is_installed("fgeo.plot")
#' library(fgeo.plot)
#'
#' autoplot(habitats)
#' }
#' autoplot(habitats)
#' }
#'
#' # Habitat data is useful for calculating species-habitat associations
#' census <- fgeo.x::tree6_3species
#'
#' as_tibble(
#' tt_test(census, habitats)
#' )
Expand Down
4 changes: 2 additions & 2 deletions R/imports.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @importFrom dplyr group_by ungroup filter select mutate summarize arrange
#' @importFrom dplyr count
#' @importFrom dplyr count n
#' @importFrom fgeo.tool check_crucial_names is_duplicated is_multiple
#' @importFrom fgeo.tool rename_matches
#' @importFrom glue glue glue_collapse
Expand Down Expand Up @@ -30,4 +30,4 @@ fgeo.tool::assert_is_installed
NULL

# Avoid CMD check warnings
utils::globalVariables(c(".data", ".", "n"))
utils::globalVariables(c(".data", "."))
4 changes: 0 additions & 4 deletions R/tt_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@
#'
#' some_species <- c("CASARB", "PREMON")
#' result <- tt_test(census, habitat, sp = some_species)
#' result
#'
#' as_tibble(result)
#'
#' summary(result)
#' @family habitat functions
#' @export
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ habitat <- fgeo_habitat(elevation, gridsize = 20, n = 4)
tt_test_result <- tt_test(pick, habitat)
#> Using `plotdim = c(320, 500)`. To change this value see `?tt_test()`.
#> Using `gridsize = 20`. To change this value see `?tt_test()`.
#> Warning: Is `census` a tree table (not a stem table)? See `?tt_test()`.

# A list or matrices
tt_test_result
Expand Down
111 changes: 26 additions & 85 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,91 +6,32 @@

## R CMD check results

1.1.2

WARNING
New submission
Strong dependencies not in mainstream repositories:
fgeo.tool
Suggests or Enhances not in mainstream repositories:
fgeo.x
Availability using Additional_repositories specification:
fgeo.tool yes https://forestgeo.github.io/drat/
fgeo.x yes https://forestgeo.github.io/drat/

NOTE
Examples with CPU or elapsed time > 5s
user system elapsed
tt_test 2.000 0.004 5.274
fgeo_habitat 1.896 0.060 5.320


ERROR
Running examples in 'fgeo.analyze-Ex.R' failed
The error most likely occurred in:
```R
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: abundance
> ### Title: Abundance and basal area, optionally by groups.
> ### Aliases: abundance basal_area
>
> ### ** Examples
>
> library(fgeo.tool)

Attaching package: 'fgeo.tool'

The following object is masked from 'package:stats':

filter

>
> # abundance() -------------------------------------------------------------
>
> abundance(data.frame(1))
Error in n() : could not find function "n"
Calls: abundance ... .summary -> summarize -> summarise.tbl_df -> summarise_impl
Execution halted
** running examples for arch 'x64' ... ERROR
Running examples in 'fgeo.analyze-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: abundance
> ### Title: Abundance and basal area, optionally by groups.
> ### Aliases: abundance basal_area
>
> ### ** Examples
>
> library(fgeo.tool)

Attaching package: 'fgeo.tool'

The following object is masked from 'package:stats':

filter

>
> # abundance() -------------------------------------------------------------
>
> abundance(data.frame(1))
Error in n() : could not find function "n"
Calls: abundance ... .summary -> summarize -> summarise.tbl_df -> summarise_impl
Execution halted
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [21s] OK
Running 'spelling.R' [0s]
Running 'testthat.R' [20s]
** running tests for arch 'x64' ... [23s] OK
Running 'spelling.R' [0s]
Running 'testthat.R' [22s]
* checking PDF version of manual ... OK
* DONE
Status: 2 ERRORs, 1 WARNING
```


* using R version 3.4.4 (2018-03-15)
* using platform: x86_64-pc-linux-gnu (64-bit)
* this is package ‘fgeo.analyze’ version ‘1.1.3’

Status: 2 NOTEs
* NOTE 1 raises if the package is built using R v3.5. (<https://ropensci.github.io/dev_guide/building.html#authorship>).
* NOTE 2 is safe to ignore.

NOTE 1
* Authors@R field gives persons with non-standard roles:
* Gabriel Arellano [aut, rev]: rev
* Suzanne Lao [aut, rev]: rev
* KangMin Ngo [rev]: rev
* Haley Overstreet [rev]: rev
* Sabrina Russo [aut, rev]: rev
* Daniel Zuleta [aut, rev]: rev

NOTE 2
* New submission
* Strong dependencies not in mainstream repositories:
* fgeo.tool
* Suggests or Enhances not in mainstream repositories:
* fgeo.x
* Availability using Additional_repositories specification:
* fgeo.tool yes https://forestgeo.github.io/drat/
* fgeo.x yes https://forestgeo.github.io/drat/

## Downstream dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

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

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

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

2 changes: 1 addition & 1 deletion docs/ISSUE_TEMPLATE.html

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

2 changes: 1 addition & 1 deletion docs/LICENSE.html

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

2 changes: 1 addition & 1 deletion docs/SUPPORT.html

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

2 changes: 1 addition & 1 deletion docs/articles/index.html

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

12 changes: 6 additions & 6 deletions docs/articles/siteonly/tt_test.html

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/authors.html

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

2 changes: 1 addition & 1 deletion docs/index.html

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

12 changes: 11 additions & 1 deletion docs/news/index.html

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

2 changes: 1 addition & 1 deletion docs/reference/abundance.html

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

2 changes: 1 addition & 1 deletion docs/reference/abundance_byyr.html

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

2 changes: 1 addition & 1 deletion docs/reference/fgeo.analyze-package.html

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

Loading

0 comments on commit 0f405dd

Please sign in to comment.