Skip to content

Commit

Permalink
Change import to importFrom except dplyr
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhangTom committed Sep 24, 2023
1 parent ece32d3 commit 8c099e5
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 11 deletions.
19 changes: 17 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export(x3p_boundary_points)
export(x3p_image_autosize)
export(x3p_surface_polygon)
import(dplyr)
import(ggplot2)
import(x3ptools)
importFrom(Cairo,CairoPNG)
importFrom(assertthat,assert_that)
importFrom(assertthat,not_empty)
Expand All @@ -31,6 +29,17 @@ importFrom(dplyr,n)
importFrom(dplyr,rename)
importFrom(dplyr,select)
importFrom(dplyr,summarize)
importFrom(ggplot2,geom_histogram)
importFrom(ggplot2,geom_line)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_raster)
importFrom(ggplot2,geom_smooth)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggsave)
importFrom(ggplot2,ggtitle)
importFrom(ggplot2,labs)
importFrom(ggplot2,scale_fill_gradient2)
importFrom(ggplot2,xlab)
importFrom(grDevices,as.raster)
importFrom(grDevices,dev.off)
importFrom(graphics,par)
Expand Down Expand Up @@ -71,8 +80,14 @@ importFrom(tidyr,nest)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,unnest)
importFrom(wires,x3p_surface_polygon)
importFrom(x3ptools,df_to_x3p)
importFrom(x3ptools,x3p_add_mask)
importFrom(x3ptools,x3p_average)
importFrom(x3ptools,x3p_bin_stripes)
importFrom(x3ptools,x3p_delete_mask)
importFrom(x3ptools,x3p_extract)
importFrom(x3ptools,x3p_get_scale)
importFrom(x3ptools,x3p_image)
importFrom(x3ptools,x3p_rotate)
importFrom(x3ptools,x3p_sample)
importFrom(x3ptools,x3p_to_df)
4 changes: 3 additions & 1 deletion R/get_sig_MSE.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#' @param method choice of \code{median} or \code{mean} when computing the summary statistics
#' @param ifplot whether graphs are displayed
#' @param delta shifting range when minimizing MSE
#' @import dplyr x3ptools ggplot2
#' @import dplyr
#' @importFrom x3ptools x3p_to_df x3p_delete_mask x3p_bin_stripes
#' @importFrom ggplot2 ggplot geom_line geom_point
#' @importFrom stats na.omit median lm coef approx
#' @importFrom purrr map_dbl map set_names
#' @importFrom tidyr nest unnest
Expand Down
4 changes: 3 additions & 1 deletion R/get_sig_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#' @param x3p x3p object
#' @param method choice of \code{median} or \code{mean} when computing the summary statistics
#' @param ifplot whether graphs are displayed
#' @import dplyr x3ptools ggplot2
#' @import dplyr
#' @importFrom x3ptools x3p_to_df
#' @importFrom ggplot2 ggplot geom_line
#' @importFrom stats na.omit median
#' @export

Expand Down
2 changes: 1 addition & 1 deletion R/get_sigalign.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @param name2 name for the second cut
#' @param legendname legend name
#' @param titlename title name
#' @import ggplot2
#' @importFrom ggplot2 ggplot geom_line labs xlab ggtitle
#' @importFrom bulletxtrctr sig_align
#' @export

Expand Down
3 changes: 2 additions & 1 deletion R/get_x3p_bin_rotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#' @param min_score_cut the tuning parameter for minimum scores required in hough transformation
#' @param ifplot whether graphs are displayed
#' @param loess_span the parameter which controls the degree of smoothing, only available when \code{method = MLE}
#' @import dplyr x3ptools
#' @import dplyr
#' @importFrom x3ptools x3p_bin_stripes x3p_extract x3p_rotate
#' @export

get_x3p_bin_rotate <- function(x3p_inner_impute, freqs = c(0, 0.3, 0.7, 1),
Expand Down
3 changes: 2 additions & 1 deletion R/get_x3p_inner_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#' @param x3p x3p object
#' @param mask_col colour for the polygon
#' @param concavity strictly positive value used in \code{concaveman::concaveman}
#' @import dplyr x3ptools
#' @import dplyr
#' @importFrom x3ptools x3p_extract x3p_average x3p_to_df
#' @importFrom tidyr pivot_longer
#' @importFrom stats sd
#' @importFrom raster raster adjacent ncell
Expand Down
4 changes: 3 additions & 1 deletion R/get_x3p_inner_impute.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#' @param ifsave whether the imputation procedure gif is going to be saved
#' @param dir_name required when \code{ifsave} is \code{TRUE}
#' @param ifplot whether graphs are displayed
#' @import dplyr x3ptools ggplot2
#' @import dplyr
#' @importFrom x3ptools x3p_delete_mask x3p_extract x3p_average x3p_add_mask
#' @importFrom ggplot2 ggplot geom_raster scale_fill_gradient2 labs ggsave
#' @importFrom assertthat assert_that not_empty
#' @importFrom raster raster focal as.data.frame as.matrix
#' @importFrom purrr map
Expand Down
3 changes: 2 additions & 1 deletion R/get_x3p_inner_nomiss_res.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#' @param x3p x3p object
#' @param mask_col colour for the polygon
#' @param concavity strictly positive value used in \code{concaveman::concaveman}
#' @import dplyr x3ptools
#' @import dplyr
#' @importFrom x3ptools df_to_x3p
#' @importFrom stats lm predict
#' @export

Expand Down
3 changes: 2 additions & 1 deletion R/get_x3p_rotate_angle_MLE.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#' @param min_score_cut the tuning parameter for minimum scores required in hough transformation
#' @param ifplot whether graphs are displayed
#' @param loess_span the parameter which controls the degree of smoothing
#' @import dplyr ggplot2
#' @import dplyr
#' @importFrom ggplot2 ggplot geom_histogram geom_point geom_smooth
#' @importFrom raster raster
#' @importFrom imager as.cimg hough_line nfline
#' @importFrom stats loess predict
Expand Down
3 changes: 2 additions & 1 deletion R/get_x3p_rotate_angle_quantile.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#' @param ntheta number of bins along theta used in \code{imager::hough_line}
#' @param min_score_cut the tuning parameter for minimum scores required in hough transformation
#' @param ifplot whether graphs are displayed
#' @import dplyr ggplot2
#' @import dplyr
#' @importFrom ggplot2 ggplot geom_histogram geom_point
#' @importFrom raster raster
#' @importFrom imager as.cimg hough_line nfline
#' @importFrom stats quantile median
Expand Down

0 comments on commit 8c099e5

Please sign in to comment.