Skip to content

Commit

Permalink
Merge eb55122 into 8ef3e42
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolepore committed Dec 6, 2018
2 parents 8ef3e42 + eb55122 commit 5f31fb4
Show file tree
Hide file tree
Showing 81 changed files with 2,306 additions and 467 deletions.
24 changes: 4 additions & 20 deletions .buildignore/tmp.R
@@ -1,26 +1,10 @@
operators.R
check_crucial_names.R
guess_plotdim.R
has_table_names.R
suffix_match.R
flag_if.R
collapse_censusid.R
name_dfs.R
rename_matches.R
warn_na.R
detect_if.R
to_tidy_names.R
gather_mat.R
drop_if_na.R
round_any.R





# TODO:

Package by package, disconnect fgeo.base from DESCRIPTION and all code

# Remove useless roxygen complexity?

# Stuff -------------------------------------------------------------------



Expand Down
4 changes: 0 additions & 4 deletions DESCRIPTION
Expand Up @@ -26,7 +26,6 @@ Depends:
Imports:
cli,
dplyr,
fgeo.base,
fgeo.ctfs,
fgeo.x,
fs,
Expand All @@ -47,17 +46,14 @@ Imports:
writexl
Suggests:
covr,
fgeo.habitat,
fgeo.map,
knitr,
spelling,
testthat
VignetteBuilder:
knitr
Remotes:
forestgeo/fgeo.base,
forestgeo/fgeo.ctfs,
forestgeo/fgeo.habitat,
forestgeo/fgeo.map,
forestgeo/fgeo.x
Encoding: UTF-8
Expand Down
15 changes: 15 additions & 0 deletions NAMESPACE
Expand Up @@ -10,12 +10,15 @@ S3method(fgeo_elevation,list)
S3method(fgeo_topography,data.frame)
S3method(fgeo_topography,default)
S3method(fgeo_topography,list)
S3method(flag_if,data.frame)
S3method(flag_if,default)
S3method(print,censuses_lst)
S3method(to_df,default)
S3method(to_df,demography_impl)
S3method(to_df,krig_lst)
S3method(to_df,tt_lst)
export("%>%")
export("%||%")
export(add_col_row)
export(add_col_row2)
export(add_count)
Expand All @@ -30,15 +33,18 @@ export(add_subquad)
export(arrange)
export(as_censuses)
export(as_tibble)
export(check_crucial_names)
export(contains)
export(convert_unit)
export(convert_unit_at)
export(count)
export(csv_list)
export(delim_list)
export(detect_if_group)
export(detect_insensitive)
export(drop_dead_stem)
export(drop_dead_tree)
export(drop_if_na)
export(drop_status)
export(drop_twice_dead)
export(ends_with)
Expand All @@ -50,22 +56,27 @@ export(everything)
export(expr)
export(exprs)
export(extract_gridsize)
export(extract_insensitive)
export(extract_plotdim)
export(fgeo_elevation)
export(fgeo_habitat)
export(fgeo_topography)
export(fill_na)
export(filter)
export(filter_status)
export(flag_if)
export(flag_if_group)
export(group_by)
export(hide_data_of_class)
export(is_duplicated)
export(is_multiple)
export(last_col)
export(list_csv)
export(list_df)
export(lookup)
export(matches)
export(mutate)
export(name_dfs)
export(nms_detect)
export(nms_extract1)
export(nms_extract_all)
Expand All @@ -85,6 +96,7 @@ export(pick_dbh_over)
export(pick_dbh_under)
export(pick_main_stem)
export(pick_main_stemid)
export(pick_plotname)
export(pick_recensus)
export(pick_status)
export(pick_top)
Expand All @@ -99,12 +111,14 @@ export(read_taxa)
export(read_vft)
export(read_with)
export(recode_subquad)
export(rename_matches)
export(sanitize_taxa)
export(sanitize_vft)
export(select)
export(show_data_of_class)
export(standardize_at)
export(starts_with)
export(suffix_match)
export(suffix_tags_beyond_edge)
export(summarise)
export(summarize)
Expand Down Expand Up @@ -137,6 +151,7 @@ importFrom(dplyr,select)
importFrom(dplyr,summarise)
importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
importFrom(fgeo.ctfs,check_crucial_names)
importFrom(glue,glue)
importFrom(glue,glue_collapse)
importFrom(magrittr,"%>%")
Expand Down
2 changes: 1 addition & 1 deletion R/add_var.R
Expand Up @@ -56,7 +56,7 @@ add_var <- function(x, var, gridsize = 20, plotdim = NULL) {

if (is.null(plotdim)) {
plotdim <- plotdim
plotdim <- guess_plotdim(.x)
plotdim <- fgeo.ctfs::guess_plotdim(.x)
message("* If guess is wrong, provide the correct argument `plotdim`")
}

Expand Down
65 changes: 0 additions & 65 deletions R/check_crucial_names.R

This file was deleted.

36 changes: 0 additions & 36 deletions R/collapse_censusid.R

This file was deleted.

2 changes: 1 addition & 1 deletion R/drop_if_na.R
Expand Up @@ -11,7 +11,7 @@
#'
#' @return A dataframe.
#' @keywords internal
#' @noRd
#' @export
#'
#' @examples
#' dfm <- data.frame(a = 1, b = NA)
Expand Down
15 changes: 7 additions & 8 deletions R/flag_if.R
Expand Up @@ -12,12 +12,13 @@
#' @param msg String. An optional custom message.
#' @param ... Other arguments passed to methods.
#'
#' @family functions to throw conditions
#'
#' @return A condition (and `.data` invisibly).
#'
#' @family functions to throw conditions
#' @family functions for internal use in other fgeo packages
#' @keywords internal
#' @noRd
#'
#' @export
#'
#' @examples
#' # WITH VECTORS
#' dupl <- c(1, 1)
Expand All @@ -44,8 +45,7 @@ flag_if <- function(.data, ...) {
}

#' @rdname flag_if
#' @keywords internal
#' @noRd
#' @export
flag_if.default <- function(.data,
predicate,
condition = warning,
Expand All @@ -57,8 +57,7 @@ flag_if.default <- function(.data,
}

#' @rdname flag_if
#' @keywords internal
#' @noRd
#' @export
flag_if.data.frame <- function(.data,
name,
predicate,
Expand Down
4 changes: 1 addition & 3 deletions R/flag_if_group.R
@@ -1,6 +1,6 @@
#' Detect and flag based on a predicate applied to a variable by groups.
#'
#' These functions extend [flag_if()] and [detect_if()] to
#' These functions extend `flag_if()`] and `detect_if()` to
#' work by groups defined with [dplyr::group_by()].
#'
#' @param .data A dataframe.
Expand All @@ -21,8 +21,6 @@
#' @export
#'
#' @examples
#' library(fgeo.base)
#'
#' tree <- tibble(CensusID = c(1, 2), treeID = c(1, 2))
#' detect_if_group(tree, "treeID", is_multiple)
#' flag_if_group(tree, "treeID", is_multiple)
Expand Down

0 comments on commit 5f31fb4

Please sign in to comment.