Skip to content

rpkgs/Ipaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 30, 2024
c93327c · Dec 30, 2024
Dec 30, 2024
Dec 30, 2024
Aug 2, 2021
Dec 23, 2024
Jun 20, 2023
Apr 10, 2023
Dec 28, 2022
Dec 28, 2022
Aug 5, 2021
Aug 12, 2024
Dec 28, 2022
May 17, 2019
Dec 23, 2024
Apr 10, 2023
Sep 4, 2021
Mar 9, 2022

Repository files navigation

Ipaper

R-CMD-check codecov License CRAN

Installation

# devtools::install_github("kongdd/Ipaper")
devtools::install_git("https://gitee.com/adv-r/Ipaper")
# or from gz file
install.packages("../Ipaper_0.1.5.9000.tar.gz", repos = NULL, type = "source", dependencies = TRUE)
# $sudo apt-get install libfftw3-dev

FUNCTIONS

rstudio shortcuts addin

Description Shortcut
copy lines at the cursor position (sublime style) Alt+C
clip lines at the cursor position Ctrl+X
Select word Ctrl+D
Insert %<>% Ctrl+Shift+,
Insert %do% {} Ctrl+Shift+D
Insert %in% {} Ctrl+Shift+I
Open in VSCode Alt+Shift+V
Open in smerge Ctrl+Shift+G
Open in subl Alt+Shift+L

Note that VSCode, smerge or subl should be in the system path, if you want to use it.

After install, run Ipaper::key_blind() to make those shortcuts work.

Visualization

  • write_fig: Unify figure writing functions, e.g. png, pdf, tif, svg

Parallel functions

  • InitCluster, killCluster.
  • llply_par, apply_par

Base tools

  • code, smerge, subl, github: open app at assigned directory
  • mkdir, touch
  • dir.show: open at assigned directory in explorer
  • runningId: print the running ID in the console
  • fprintf: c style fprintf
  • melt_list, melt_tree, listk, dcast2
df <- data.frame(year = 2010, day = 1:2, month = 1, site = "A")
l  <- list(a = df, b = df)
melt_list(l, "id")
#>    id year day month site
#> 1:  a 2010   1     1    A
#> 2:  a 2010   2     1    A
#> 3:  b 2010   1     1    A
#> 4:  b 2010   2     1    A

l2 <- listk("type1" = l, "type2" = l)
melt_tree(l2, c("type", "id"))
#>     type id year day month site
#> 1: type1  a 2010   1     1    A
#> 2: type1  a 2010   2     1    A
#> 3: type1  b 2010   1     1    A
#> 4: type1  b 2010   2     1    A
#> 5: type2  a 2010   1     1    A
#> 6: type2  a 2010   2     1    A
#> 7: type2  b 2010   1     1    A
#> 8: type2  b 2010   2     1    A
  • reoder_name, rm_empty, match2
  • write_list2xlsx, read_xlsx2list
  • which.na, which.notna, which.isnull, which.notnull

Updates

  • mkTrend and slope has been moved to the package rtrend