R Base
Strings
Ipaper.str_extract
— Functionstr_extract(x::AbstractString, pattern::AbstractString)
str_extract(x::Vector{<:AbstractString}, pattern::AbstractString)
Ipaper.str_extract_all
— Functionstr_extract_all(
x::AbstractString,
pattern::Union{Regex, AbstractString}
) -> Union{Vector{SubString{Base.AnnotatedString{String}}}, Vector{SubString{String}}}
Ipaper.str_replace
— Functionstr_replace(x::AbstractString, pattern::AbstractString, replacement::AbstractString = "")
Ipaper.grepl
— Functiongrep(x::Union{AbstractString,Vector{<:AbstractString}},
pattern::AbstractString)::AbstractArray{Int,1}
grepl(x::Vector{<:AbstractString}, pattern::AbstractString)::AbstractArray{Bool,1}
grepl(x::AbstractString, pattern::AbstractString)
Plots
Ipaper.merge_pdf
— Functionmerge_pdf("*.pdf", output="Plot.pdf")
Please install pdftk first. On Linux, sudo apt install pdftk-java
.
merge multiple pdf files by pdftk
Ipaper.show_pdf
— Functionopen pdf file in SumatraPDF
cmd
Ipaper.dir
— Functiondir(path = ".", pattern = ""; full_names = true, include_dirs = false, recursive = false)
Arguments:
path
pattern
full_names
include_dirs
recursive
Example
dir("src", "\.jl$")
Ipaper.path_mnt
— Functionpath_mnt(path = ".")
Relative path will kept the original format.
Ipaper.writelines
— Functionwritelines(
x::AbstractVector{<:AbstractString},
f::AbstractString;
mode,
eof
)
Arguments
mode
:
Mode Description Keywords –––– ––––––––––– ––––––––––––––––––––––––– r read none w write write = true r+ read, write read = true, write = true w+ read, write read = true, write = true
@seealso readlines
! x
需要是string,不然文件错误
R base
Ipaper.duplicated
— Functionduplicated(x::Vector{<:Real})
x = [1, 2, 3, 4, 1]
duplicated(x)
# [0, 0, 0, 0, 1]
Ipaper.list
— Functionlist(keys::Vector{Symbol}, values)
list(keys::Vector{<:AbstractString}, values)
Examples
list([:dw, :betaw, :swmax, :a, :c, :kh, :uh]
Ipaper.match2
— Functionmatch2(x, y)
Examples
## original version
mds = [1, 4, 3, 5]
md = [1, 5, 6]
findall(r_in(mds, md))
indexin(md, mds)
## modern version
x = [1, 2, 3, 3, 4]
y = [0, 2, 2, 3, 4, 5, 6]
match2(x, y)
Note: match2 only find the element in y
Missing
Ipaper.drop_missing
— Functiondrop_missing
drop_missing(
x::AbstractArray{Union{Missing, T<:Real}}
) -> Any
drop_missing(
x::AbstractArray{Union{Missing, T<:Real}},
replacement
) -> Any
Ipaper.to_missing
— Functionto_missing(x::AbstractArray{T}, replacement=0)
to_missing(x::AbstractMissArray{T}, replacement=0)
to_missing!(x::AbstractMissArray{T}, replacement=0)
convert replacement
to missing
to_missing(
x::AbstractArray{T<:Real}
) -> Union{CategoricalArrays.CategoricalArray, AbstractArray{Union{Missing, T}} where T<:Real}
to_missing(
x::AbstractArray{T<:Real},
replacement
) -> Union{CategoricalArrays.CategoricalArray, AbstractArray{Union{Missing, T}} where T<:Real}
Usage
to_missing(x)
to_missing(x, replacement)
defined at /home/runner/work/Ipaper.jl/Ipaper.jl/src/missing.jl:49
.