Convert R Objects from One Structure to Another


[Up] [Top]

Documentation for package ‘str2str’ version 1.0.0

Help Pages

str2str-package Structure to Structure
a2d (3D+) Array to Data-Frame
a2la (3D+) Array to List of (3D+) Arrays
a2ld 3D Array to List of Data-Frames
a2lm (3D) Array to List of Matrices
a2v (3D+) Array to (Atomic) Vector
abind<- Add array slices to 3D+ Array ''abind<-'' adds array slices to arrays as a side effect. It used the function 'abind' in the 'abind' package. The purpose of the function is to replace the need to use ary2 <- abind(ary1, mat1); ary3 <- rbind(ary2, mat2); ary4 <- rbind(ary3, mat3), etc. It allows you to specify the dimension you wish to bind 'along' as well as the dimname you wish to bind 'after'. Unlike ''cbind<-'', ''rbind<-'', and ''append<-'', it does not have overwriting functionality (I could not figure out how to code that); therefore, if 'value' has some dimnames that are the same as those in 'a', it will NOT overwrite them and simply bind them to 'a', resulting in duplicate dimnames.
all_diff Test if All Elements are Different
all_same Test if All Elements are the Same
append<- Add Elements to Vectors
cat0 Concatenate and Print with No Separator
cbind<- Add Columns to Data Objects
cbind_fill Bind DataFrames Along Columns - Filling in Missing Rows with NA
cbind_fill_matrix Bind Matrices Along Columns - Filling in Missing Rows with NA
codes Integer Codes of Factor Levels
d2a Data-Frame to (3D+) Array or Matrix
d2d Data-Frame to Data-Frame (e.g., factors to character vectors)
d2ld Data-Frame to List of Data-Frames
d2lv Data-Frame to List of (Atomic) Vectors
d2m Data-Frame to Matrix
d2v Data-Frame to (Atomic) Vector
dimlabels Dimension labels (i.e., names of dimnames)
dimlabels<- Add Elements to Vectors
e2l Environment to List
fct2v Factor to (Atomic) Vector
grab 'grab' extracts the contents of objects in an environment based on their object names as a character vector. The object contents are stored to a list where the names are the object names.
inbtw Elements Inbetween Values Within a (Atomic) Vector
is.avector Test for an Atomic Vector
is.cnumeric Test for Character Numbers
is.colnames Test for 'colnames'
is.Date Test for a Date object
is.dummy Test for a Dummy Variable
is.empty Test for Empty Characters
is.names Test for 'names'
is.POSIXct Test for a POSIXct object
is.POSIXlt Test for a POSIXlt object
is.row.names Test for 'row.names'
is.rownames Test for 'rownames'
is.whole Test for Whole Numbers
Join Join (or Merge) a List of Data-frames
la2a List of (3D+) Arrays to (3D+) Array
laynames Names of the Layers (the Third Dimension)
ld2a List of Data-Frames to a 3D Array
ld2d List of Data-Frames to Data-Frame
ld2v List of Data-Frames to (Atomic) Vector
lm2a List of Matrices to 3D Array
lm2d List of Matrices to Data-Frame
lm2v List of Matrices to (Atomic) Vector
lv2d List of (atomic) vectors to Data-Frame
lv2m List of (atomic) Vectors to Matrix
lv2v List of (atomic) Vectors to (atomic) Vector
m2d Matrix to Data-Frame
m2lv Matrix to List of (Atomic) Vectors
m2v Matrix to (Atomic) Vector
ndim Number of Object Dimensions
nlay Number of Layers (the Third Dimension)
not.colnames Identify Elements That are Not Colnames
not.names Identify Elements That are Not Names
not.row.names Identify Elements That are Not Row.names
not.rownames Identify Elements That are Not Rownames
order.custom Custom Order Permutation
pick Extract Elements From a (Atomic) Vector
rbind<- Add Rows to Data Objects
sn Set a Vector's Names as its Elements
stack2 Stack one Set of Variables from Wide to Long
str2str Structure to Structure
try_expr Add Try to Expression
try_fun Add Try to Function
t_list Transpose a List
undim Undimension an Object
undimlabel Undimlabel an Object
undimname Undimname an Object
unstack2 Unstack one Set of Variables from Long to Wide
v2d (Atomic) Vector to Data-Frame
v2fct Character Vector to (Unordered) Factor
v2frm Character Vector to Formula
v2lv (Atomic) Vector to List of (Atomic) Vectors
v2m (Atomic) Vector to Matrix