lazy.tools {lazy.tools} | R Documentation |
This package provides the following categories of functions:
cards: read inline data.
Print: Print objects with their names and formats.
Printb: Print super matrix (partitioned or block matrix) with separators. alias: printb
printm: A simple version of Print which can print data frames together with matrices. alias: Printm
fuzz: Print with fuzz=1e-4 option.
demomat: Set up a matrix whose elements consist of row and col
numbers.
get_val: Get values from an array at the location specified by subs.
'put_val: Modify the values of an array.
get_valL: Get values from a list of data frames.
'put_valL: Modify the values of a list of data frames.
get_valLL: Get values from a list of lists.
merge2: Returns the merged data frames with contribution indices.
stack_df: Vertically stack several data frames.
merge_df: Horizontally stack (merge) several data frames with unequal # of obs.
varlist: Interprete sas-like abbreviated variable list.
vartype: find the mode/type of the columns of data.
keepdrop: Keep or Drop the variables.
convert: Converts the type/class of the columns of a data frame
or a matrix.
named_list: Create a named list.
from_named_list: Retrieve Objects from a Named List.
graph2pdf: Output Graphs to PDF Device.
analyze_three_dots: Analyze the Three Dots and Return the Names and the Values.
Exists: Check if the Objects Exists.
ceiling_n: Return the Ceiling and Power of the Input using Radix (Base) of n.
perm: Generate all m-permutations of n elements.
comb: Generate all combinations of n elements taken m at a time.
comments: Comment out multiple lines.
complex_index: Finds the complexity index of a 0-1 pattern.
cprod: Cartesian product of many vectors and matrices.
cumsuminv: Inverse of Cummurative Sum.
decp: Returns the (approximate) # of Digits on the Both Sides of the Decimal Point.
etime: Elapsed Time.
expand_grid1: Expand.grid with rev and name option.
gen01pat: Generate all possible 0-1 patterns of given length, or binary partition index matrix
is.varname: Check if the argument is a valid variable name.
is.number: Check if a vector consists of numbers.
loceq: Returns the locations of the elements of the first argument whose values are equal to one of the elements in the second argument
lv: Retruns the Last Value.
rmv: Remove Objects If They Exists in the Parent Frame.
Seq: Smart Sequence Generation.
Unique: Unique values and their locations
was: Displays the attribuets and the structure of the input.
yearJAD: Conversion between Japanese era year and AD.
makeStack: Generation of a set of stack operation functions.
And: Combines the string arguments by &.
Infix version is %&%
and %&&%
Or: Combines the string arguments by |.
Infix version is %|%
and %||%
Not: Negate the expression as !expression.
add_paren: Adds enclosing parentheses to an expression.
remove_paren: removes enclosing parentheses from an expression.
locbalpar: Returns the location of the matching parentheis in a string.
locbalpar2: Returns the location of the matching parentheis.
locbalq: Returns the location of the next quote.
replacec: Replace Characters by New Ones.
revchar: Reverse string.
revstr: Reverse string.
str_olay: Overlay strings.
trim: trim leading and trailing blanks.
testregex: Test Regular Expression
Grep: User Friendly grep/gsub
(lazy.utf8 package consists of the functions in this section + printm.)
is.DBCS: Checks if the Characters in a String are Multi Byte Characters.
is.MBCS: Checks if the Characters in a String are Multi Byte
Characters.
ReadLines: Read Lines with or without Encoding Option.
WriteLines: Write Lines with or without Encoding Option.
Examples of Shif-JIS and UTF-8( with BOM or w/o BOM)
text files are included.
Use below to find out where these files are stored:
system.file("TestData1.txt",package="lazy.tools") system.file("TestData2.txt",package="lazy.tools") system.file("TestData3.txt",package="lazy.tools")
nbyte: Returns the number of bytes used to represent each character.
nchar2: nchar using byte as the unit.
cchar: Starting and Ending Columns of Each Character in a Text File.
substr2: substr using column location as the unit.
substrDBCS: substr using column location as the unit for
strictly Double byte characters (including ASCII characters.) on R 4.1.3.
(deprecated)
char2num: Convert a string to a numeric vector
num2char: Convert a numeric vector to a string
generate_zenkaku_sets: Generate Zenkaku Character Set
pref2dist: Convert Japanese prefectures to districts
%&%, %&&%, %|%, %||% for And
and Or
.
generate_AndOr: Generates string infix operators &, &&, |, ||
which are almost equivalent to: %&%, %&&%, %|%, %||% .
%//% Mathematical-like postfix application of a function
package_info: Creates html files from the help files of an R package.
package_description: Displays the package description.
find_functions: Find the functions used in a function.
This function uses "codetools" package.
find_calling_functions: Find the functions which use a function.
This function uses "codetools" package.
check_partial_match: Checks if the partial match is correct.
new_name: Renames the elements according to a table. (deprecated?)
This function uses "naturalsort" package.
recode: Recode the values of an object from "from" to "to".
sortit: Sort the first argument by ... .
order2: Returns a permutation which rearranges its first argument in the order specified by the second argument.
sort_missing_data: Sort Matrix/Data Frame According to the Pattern of the Missing Elements.
expand_freqdist: Expand Frequency Distribution to Raw Data
freqdist1: Frequency distribution of univariate numeric data with case weight and midpoints.
freqdist: Frequency distribution of multivariate numeric data with case weight and midpoints.
freqc: Frequency distribution of many discrete variables
jfreq: Joint frequency distribution of discrete variables
merge_tables: Merge two or more tables or frequency distributions.
compress_freqdist: Compress frequency distributions by aggregating duplicate entries.
table2freqdist: Convert the output of native table or xtabs to (levels, frequency) format.
plot_freqdist: Plot univariate frequency distribution.
gen_midp: Generate equally spaced n midpoints in [min, max].
get_range: Convert levels to range.
brk2midp: Define midpoints from break points.
midp2brk: Define break points from midpoints.
Quantile: Sample quantiles by reverse interpolating sample cdf.
design_expand: Dummy Expantion of a Vector
interpol: Interpolation of data
logistic: logistic function with D=1.7
logistic1: logistic function with D and minimum value
logit: logit function with D=1.7
logit1: logit function with D and minimum value
mands: Calculates mean, std, var, and nobs with case weight
mandd: Calculates mean vector and dispersion matrix with case weight
princ: Principal Component Analysis of Y with possible missing elements
normalize_config: Normalize the input matrix
reorder_fa: Reorder the rows and columns of factor pattern matrix
reflect_fa: Reflect the signs of the columns of factor pattern matrix
smoothra: Running average smoothing
standard: Column standardization of a data frame, matrix, or vector
wquantile: Weighted Quantile
iotable: Inside-Out Plot
pplot: Profile Display (horizontal)
plot_interval: Plot Horizontal Line on top of Density Plot
radarchart: Radar Chart
distancew: Calculation of Weighted Distance Matrices
distancew0: Calculation of Weighted Distance Matrix
distrectw: Calculation of Weighted Distance Matrix between the rows of F and A
gen_test_score: Generate Discrete Test Score Distribution.
gen_test_score_CTT: Generate Discrete Test Score Distribution according to Classical Test Theory.
eq: Observed Test Score Equating.
dummy_expand: dummy_expand the compressed item response data.
dummy_compress: compress the uncompressed item response data.