--- output: md_document --- ``` ## function (x) ## x ## ## ``` ``` ## Identity Function ## ## Description: ## ## A trivial identity function returning its argument. ## ## Usage: ## ## identity(x) ## ## Arguments: ## ## x: an R object. ## ## See Also: ## ## 'diag' creates diagonal matrices, including identity ones. ``` ``` ## 'data.frame': 150 obs. of 5 variables: ## $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ... ## $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ... ## $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ... ## $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ... ## $ Species : Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ... ``` ``` ## Edgar Anderson's Iris Data ## ## Description: ## ## This famous (Fisher's or Anderson's) iris data set gives the ## measurements in centimeters of the variables sepal length and ## width and petal length and width, respectively, for 50 flowers ## from each of 3 species of iris. The species are _Iris setosa_, ## _versicolor_, and _virginica_. ## ## Usage: ## ## iris ## iris3 ## ## Format: ## ## 'iris' is a data frame with 150 cases (rows) and 5 variables ## (columns) named 'Sepal.Length', 'Sepal.Width', 'Petal.Length', ## 'Petal.Width', and 'Species'. ## ## 'iris3' gives the same data arranged as a 3-dimensional array of ## size 50 by 4 by 3, as once provided by S-PLUS. The first ## dimension gives the case number within the species subsample, the ## second the measurements with names 'Sepal L.', 'Sepal W.', 'Petal ## L.', and 'Petal W.', and the third the species. ## ## Source: ## ## Fisher, R. A. (1936) The use of multiple measurements in taxonomic ## problems. _Annals of Eugenics_, *7*, Part II, 179-188. ## doi:10.1111/j.1469-1809.1936.tb02137.x ## . ## ## The data were collected by Anderson, Edgar (1935). The irises of ## the Gaspe Peninsula, _Bulletin of the American Iris Society_, ## *59*, 2-5. ## ## References: ## ## Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S ## Language_. Wadsworth & Brooks/Cole. (has 'iris3' as 'iris'.) ## ## See Also: ## ## 'matplot' some examples of which use 'iris'. ## ## Examples: ## ## summary(iris) ## ## ## Fisher's (1936) research question: whether (compound measurements of) ## ## Iris versicolor "differs twice as much from I. setosa as from I. virginica" ## pairs(iris[1:4], col = iris$Species) ## legend(0.5, 1, levels(iris$Species), fill = 1:3, bty = "n", ## horiz = TRUE, xjust = 0.5, yjust = 0, xpd = TRUE) ## ## ## equivalence of legacy array (iris3) and data.frame (iris) representation ## dni3 <- dimnames(iris3) ## ii <- data.frame(matrix(aperm(iris3, c(1,3,2)), ncol = 4, ## dimnames = list(NULL, sub(" L.",".Length", ## sub(" W.",".Width", dni3[[2]])))), ## Species = gl(3, 50, labels = sub("S", "s", sub("V", "v", dni3[[3]])))) ## stopifnot(all.equal(ii, iris)) ``` ``` ## Information on package 'base' ## ## Description: ## ## Package: base ## Version: 4.4.0 ## Priority: base ## Title: The R Base Package ## Author: R Core Team and contributors worldwide ## Maintainer: R Core Team ## Contact: R-help mailing list ## Description: Base R functions. ## License: Part of R 4.4.0 ## Suggests: methods ## Enhances: chron, date, round ## Built: R 4.4.0; ; 2024-03-27 08:58:14 UTC; windows ## ## Index: ## ## .Call Modern Interfaces to C/C++ code ## .Device Lists of Open/Active Graphics Devices ## .Internal Call an Internal Function ## .Last.value Value of Last Evaluated Expression ## .Library Search Paths for Packages ## .Machine Numerical Characteristics of the Machine ## .Platform Platform Specific Variables ## .Primitive Look Up a Primitive Function ## .S3method Register S3 Methods ## .bincode Bin a Numeric Vector ## .deparseOpts Options for Expression Deparsing ## .onLoad Hooks for Namespace Events ## .packages Listing of Packages ## .standard_regexps Miscellaneous Internal/Programming Utilities ## : Colon Operator ## :: Double Colon and Triple Colon Operators ## @ Extract or Replace a Slot or Property ## Arithmetic Arithmetic Operators ## AsIs Inhibit Interpretation/Conversion of Objects ## Bessel Bessel Functions ## Comparison Relational Operators ## Constants Built-in Constants ## Control Control Flow ## Cstack_info Report Information on C Stack Size and Usage ## DateTimeClasses Date-Time Classes ## Dates Date Class ## Defunct Marking Objects as Defunct ## Deprecated Marking Objects as Deprecated ## Encoding Read or Set the Declared Encodings for a ## Character Vector ## Extract Extract or Replace Parts of an Object ## Filter Common Higher-Order Functions in Functional ## Programming Languages ## Foreign Foreign Function Interface ## ISOdatetime Date-time Conversion Functions from Numeric ## Representations ## InternalMethods Internal Generic Functions ## La_library LAPACK Library ## La_version LAPACK Version ## Logic Logical Operators ## Memory Memory Available for Data Storage ## Memory-limits Memory Limits in R ## NA 'Not Available' / Missing Values ## NULL The Null Object ## NotYetImplemented Not Yet Implemented Functions and Unused ## Arguments ## NumericConstants Numeric Constants ## Ops.Date Operators on the Date Class ## Paren Parentheses and Braces ## Quotes Quotes ## R.Version Version Information ## R.home Return the R Home Directory ## Random Random Number Generation ## Random.user User-supplied Random Number Generation ## Rdconv Utilities for Processing Rd Files ## Recall Recursive Calling ## Reserved Reserved Words in R ## Special Special Functions of Mathematics ## StackOverflows Stack Overflow Errors ## Startup Initialization at Start of an R Session ## Syntax Operator Syntax and Precedence ## Sys.getenv Get Environment Variables ## Sys.getpid Get the Process ID of the R Session ## Sys.glob Wildcard Expansion on File Paths ## Sys.info Extract System and User Information ## Sys.localeconv Find Details of the Numerical and Monetary ## Representations in the Current Locale ## Sys.readlink Read File Symbolic Links ## Sys.setFileTime Set File Time ## Sys.setenv Set or Unset Environment Variables ## Sys.sleep Suspend Execution for a Time Interval ## Sys.time Get Current Date and Time ## Sys.which Find Full Paths to Executables ## Tailcall 'Tailcall' and 'Exec' ## Trig Trigonometric Functions ## UseMethod Class Methods ## Vectorize Vectorize a Scalar Function ## [.data.frame Extract or Replace Parts of a Data Frame ## [.factor Extract or Replace Parts of a Factor ## abbreviate Abbreviate Strings ## abs Miscellaneous Mathematical Functions ## addTaskCallback Add or Remove a Top-Level Task Callback ## agrep Approximate String Matching (Fuzzy Matching) ## all Are All Values True? ## all.equal Test if Two Objects are (Nearly) Equal ## all.names Find All Names in an Expression ## any Are Some Values True? ## aperm Array Transposition ## append Vector Merging ## apply Apply Functions Over Array Margins ## args Argument List of a Function ## array Multi-way Arrays ## array2DF Convert array to data frame ## as.Date Date Conversion Functions to and from Character ## as.POSIXct Date-time Conversion Functions ## as.data.frame Coerce to a Data Frame ## as.environment Coerce to an Environment Object ## as.function Convert Object to Function ## asplit Split Array/Matrix By Its Margins ## assign Assign a Value to a Name ## assignOps Assignment Operators ## attach Attach Set of R Objects to Search Path ## attachNamespace Loading and Unloading Name Spaces ## attr Object Attributes ## attributes Object Attribute Lists ## autoload On-demand Loading of Packages ## backsolve Solve an Upper or Lower Triangular System ## balancePOSIXlt Balancing "Ragged" and Out-of-range POSIXlt ## Date-Times ## base-package The R Base Package ## basename Manipulate File Paths ## bindenv Binding and Environment Locking, Active ## Bindings ## bitwNot Bitwise Logical Operations ## body Access to and Manipulation of the Body of a ## Function ## bquote Partial substitution in expressions ## browser Environment Browser ## browserText Functions to Retrieve Values Supplied by Calls ## to the Browser ## builtins Returns the Names of All Built-in Objects ## by Apply a Function to a Data Frame Split by ## Factors ## c Combine Values into a Vector or List ## call Function Calls ## callCC Call With Current Continuation ## capabilities Report Capabilities of this Build of R ## cat Concatenate and Print ## cbind Combine R Objects by Rows or Columns ## ceiling Rounding of Numbers ## char.expand Expand a String with Respect to a Target Table ## charToRaw Convert to or from (Bit/Packed) Raw Vectors ## character Character Vectors ## charmatch Partial String Matching ## chartr Character Translation and Case Folding ## chkDots Warn About Extraneous Arguments in the "..." of ## Its Caller ## chol The Cholesky Decomposition ## chol2inv Inverse from Cholesky (or QR) Decomposition ## chooseOpsMethod Choose the Appropriate Method for Ops ## class Object Classes ## col Column Indexes ## colSums Form Row and Column Sums and Means ## commandArgs Extract Command Line Arguments ## comment Query or Set a '"comment"' Attribute ## complex Complex Numbers and Basic Functionality ## conditions Condition Handling and Recovery ## conflicts Search for Masked Objects on the Search Path ## connections Functions to Manipulate Connections (Files, ## URLs, ...) ## contributors R Project Contributors ## copyright Copyrights of Files Used to Build R ## cosh Hyperbolic Functions ## crossprod Matrix Cross-Product ## cumsum Cumulative Sums, Products, and Extremes ## curlGetHeaders Retrieve Headers from URLs ## cut Convert Numeric to Factor ## cut.POSIXt Convert a Date or Date-Time Object to a Factor ## data.class Object Classes ## data.frame Data Frames ## data.matrix Convert a Data Frame to a Numeric Matrix ## date System Date and Time ## debug Debug a Function ## declare Declarations ## delayedAssign Delay Evaluation and Promises ## deparse Expression Deparsing ## det Calculate the Determinant of a Matrix ## detach Detach Objects from the Search Path ## diag Matrix Diagonals ## diff Lagged Differences ## difftime Time Intervals / Differences ## dim Dimensions of an Object ## dimnames Dimnames of an Object ## dir.create Manipulation of Directories and File ## Permissions ## do.call Execute a Function Call ## dontCheck Identity Function to Suppress Checking ## dots ..., '..1', etc used in Functions ## double Double-Precision Vectors ## dput Write an Object to a File or Recreate it ## drop Drop Redundant Extent Information ## droplevels Drop Unused Levels from Factors ## dump Text Representations of R Objects ## duplicated Determine Duplicate Elements ## dyn.load Foreign Function Interface ## eapply Apply a Function Over Values in an Environment ## eigen Spectral Decomposition of a Matrix ## encodeString Encode Character Vector as for Printing ## environment Environment Access ## environment variables Environment Variables ## eval Evaluate an (Unevaluated) Expression ## exists Is an Object Defined? ## expand.grid Create a Data Frame from All Combinations of ## Factor Variables ## expression Unevaluated Expressions ## extSoftVersion Report Versions of Third-Party Software ## factor Factors ## file path encoding File Paths not in the Native Encoding ## file.access Ascertain File Accessibility ## file.choose Choose a File Interactively ## file.info Extract File Information ## file.path Construct Path to File ## file.show Display One or More Text Files ## files File Manipulation ## find.package Find Packages ## findInterval Find Interval Numbers or Indices ## force Force Evaluation of an Argument ## forceAndCall Call a function with Some Arguments Forced ## formals Access to and Manipulation of the Formal ## Arguments ## format Encode in a Common Format ## format.info format(.) Information ## format.pval Format P Values ## formatC Formatting Using C-style Formats ## formatDL Format Description Lists ## function Function Definition ## gc Garbage Collection ## gc.time Report Time Spent in Garbage Collection ## gctorture Torture Garbage Collector ## get Return the Value of a Named Object ## getDLLRegisteredRoutines ## Reflectance Information for C/Fortran routines ## in a DLL ## getHook Functions to Get and Set Hooks for Load, ## Attach, Detach and Unload ## getLoadedDLLs Get DLLs Loaded in Current Session ## getNativeSymbolInfo Obtain a Description of one or more Native ## (C/Fortran) Symbols ## getTaskCallbackNames Query the Names of the Current Internal ## Top-Level Task Callbacks ## gettext Translate Text Messages ## getwd Get or Set Working Directory ## gl Generate Factor Levels ## grep Pattern Matching and Replacement ## grepRaw Pattern Matching for Raw Vectors ## groupGeneric S3 Group Generic Functions ## grouping Grouping Permutation ## gzcon (De)compress I/O Through Connections ## hexmode Integer Numbers Displayed in Hexadecimal ## iconv Convert Character Vector between Encodings ## icuSetCollate Setup Collation by ICU ## identical Test Objects for Exact Equality ## identity Identity Function ## ifelse Conditional Element Selection ## integer Integer Vectors ## interaction Compute Factor Interactions ## interactive Is R Running Interactively? ## invisible Change the Print Mode to Invisible ## is.finite Finite, Infinite and NaN Numbers ## is.function Is an Object of Type (Primitive) Function? ## is.language Is an Object a Language Object? ## is.object Is an Object 'internally classed'? ## is.recursive Is an Object Atomic or Recursive? ## is.single Is an Object of Single Precision Type? ## is.unsorted Test if an Object is Not Sorted ## isS4 Test for an S4 object ## isSymmetric Test if a Matrix or other Object is Symmetric ## (Hermitian) ## jitter 'Jitter' (Add Noise) to Numbers ## kappa Compute or Estimate the Condition Number of a ## Matrix ## kronecker Kronecker Products on Arrays ## l10n_info Localization Information ## labels Find Labels from Object ## lapply Apply a Function over a List or Vector ## length Length of an Object ## lengths Lengths of List or Vector Elements ## levels Levels Attributes ## libcurlVersion Report Version of libcurl ## library Loading/Attaching and Listing of Packages ## library.dynam Loading DLLs from Packages ## license The R License Terms ## list Lists - Generic and Dotted Pairs ## list.files List the Files in a Directory/Folder ## list2DF Create Data Frame From List ## list2env From A List, Build or Add To an Environment ## load Reload Saved Datasets ## locales Query or Set Aspects of the Locale ## log Logarithms and Exponentials ## logical Logical Vectors ## long vector Long Vectors ## lower.tri Lower and Upper Triangular Part of a Matrix ## ls List Objects ## make.names Make Syntactically Valid Names ## make.unique Make Character Strings Unique ## mapply Apply a Function to Multiple List or Vector ## Arguments ## marginSums Compute Table Margins ## mat.or.vec Create a Matrix or a Vector ## match Value Matching ## match.arg Argument Verification Using Partial Matching ## match.call Argument Matching ## match.fun Extract a Function Specified by Name ## matmult Matrix Multiplication ## matrix Matrices ## max Maxima and Minima ## max.col Find Maximum Position in Matrix ## mean Arithmetic Mean ## mem.maxVSize Query and Set Heap Size Limits ## memCompress In-memory Compression and Decompression ## memory.profile Profile the Usage of Cons Cells ## merge Merge Two Data Frames ## message Diagnostic Messages ## missing Does a Formal Argument have a Value? ## mode The (Storage) Mode of an Object ## mtfrm Auxiliary Function for Matching ## name Names and Symbols ## names The Names of an Object ## nargs The Number of Arguments to a Function ## nchar Count the Number of Characters (or Bytes or ## Width) ## nlevels The Number of Levels of a Factor ## noquote Class for 'no quote' Printing of Character ## Strings ## norm Compute the Norm of a Matrix ## normalizePath Express File Paths in Canonical Form ## nrow The Number of Rows/Columns of an Array ## numeric Numeric Vectors ## numeric_version Numeric Versions ## octmode Integer Numbers Displayed in Octal ## on.exit Function Exit Code ## options Options Settings ## order Ordering Permutation ## outer Outer Product of Arrays ## parse Parse R Expressions ## paste Concatenate Strings ## path.expand Expand File Paths ## pcre_config Report Configuration Options for PCRE ## pipeOp Forward Pipe Operator ## plot Generic X-Y Plotting ## pmatch Partial String Matching ## polyroot Find Zeros of a Real or Complex Polynomial ## pos.to.env Convert Positions in the Search Path to ## Environments ## pretty Pretty Breakpoints ## print Print Values ## print.data.frame Printing Data Frames ## print.default Default Printing ## prmatrix Print Matrices, Old-style ## proc.time Running Time of R ## prod Product of Vector Elements ## proportions Express Table Entries as Fraction of Marginal ## Table ## pushBack Push Text Back on to a Connection ## qr The QR Decomposition of a Matrix ## qr.X Reconstruct the Q, R, or X Matrices from a QR ## Object ## quit Terminate an R Session ## range Range of Values ## rank Sample Ranks ## rapply Recursively Apply a Function to a List ## raw Raw Vectors ## rawConnection Raw Connections ## read.dcf Read and Write Data in DCF Format ## readBin Transfer Binary Data To and From Connections ## readChar Transfer Character Strings To and From ## Connections ## readLines Read Text Lines from a Connection ## readRDS Serialization Interface for Single Objects ## readRenviron Set Environment Variables from a File ## readline Read a Line from the Terminal ## reg.finalizer Finalization of Objects ## regex Regular Expressions as used in R ## regmatches Extract or Replace Matched Substrings ## remove Remove Objects from a Specified Environment ## rep Replicate Elements of Vectors and Lists ## replace Replace Values in a Vector ## rev Reverse Elements ## rle Run Length Encoding ## round.POSIXt Round / Truncate Date-Time Objects ## row Row Indexes ## row.names Get and Set Row Names for Data Frames ## rownames Row and Column Names ## rowsum Give Column Sums of a Matrix or Data Frame, ## Based on a Grouping Variable ## sQuote Quote Text ## sample Random Samples and Permutations ## save Save R Objects ## scale Scaling and Centering of Matrix-like Objects ## scan Read Data Values ## search Give Search Path for R Objects ## seek Functions to Reposition Connections ## seq Sequence Generation ## seq.Date Generate Regular Sequences of Dates ## seq.POSIXt Generate Regular Sequences of Times ## sequence Create A Vector of Sequences ## serialize Simple Serialization Interface ## setTimeLimit Set CPU and/or Elapsed Time Limits ## shQuote Quote Strings for Use in OS Shells ## shell Invoke a System Command, using a Shell ## shell.exec Open a File or URL using Windows File ## Associations ## showConnections Display Connections ## sign Sign Function ## sink Send R Output to a File ## slice.index Slice Indexes in an Array ## socketSelect Wait on Socket Connections ## solve Solve a System of Equations ## sort Sorting or Ordering Vectors ## sort_by Sorting Vectors or Data Frames by Other Vectors ## source Read R Code from a File, a Connection or ## Expressions ## split Divide into Groups and Reassemble ## sprintf Use C-style String Formatting Commands ## srcfile References to Source Files and Code ## standardGeneric Formal Method System - Dispatching S4 Methods ## startsWith Does String Start or End With Another String? ## stop Stop Function Execution ## stopifnot Ensure the Truth of R Expressions ## strptime Date-time Conversion Functions to and from ## Character ## strrep Repeat the Elements of a Character Vector ## strsplit Split the Elements of a Character Vector ## strtoi Convert Strings to Integers ## strtrim Trim Character Strings to Specified Display ## Widths ## structure Attribute Specification ## strwrap Wrap Character Strings to Format Paragraphs ## subset Subsetting Vectors, Matrices and Data Frames ## substitute Substituting and Quoting Expressions ## substr Substrings of a Character Vector ## sum Sum of Vector Elements ## summary Object Summaries ## svd Singular Value Decomposition of a Matrix ## sweep Sweep out Array Summaries ## switch Select One of a List of Alternatives ## sys.parent Functions to Access the Function Call Stack ## sys.source Parse and Evaluate Expressions from a File ## system Invoke a System Command ## system.file Find Names of R System Files ## system.time CPU Time Used ## system2 Invoke a System Command ## t Matrix Transpose ## table Cross Tabulation and Table Creation ## tabulate Tabulation for Vectors ## tapply Apply a Function Over a Ragged Array ## taskCallbackManager Create an R-level Task Callback Manager ## tempfile Create Names for Temporary Files ## textConnection Text Connections ## tilde Tilde Operator ## timezones Time Zones ## toString Convert an R Object to a Character String ## topenv Top Level Environment ## trace Interactive Tracing and Debugging of Calls to a ## Function or Method ## traceback Get and Print Call Stacks ## tracemem Trace Copying of Objects ## transform Transform an Object, for Example a Data Frame ## trimws Remove Leading/Trailing Whitespace ## try Try an Expression Allowing Error Recovery ## typeof The Type of an Object ## union Set Operations ## unique Extract Unique Elements ## units Units ## unlink Delete Files and Directories ## unlist Flatten Lists ## unname Remove 'names' or 'dimnames' ## use Use Packages ## utf8ToInt Convert Integer Vectors to or from ## UTF-8-encoded Character Vectors ## validUTF8 Check if a Character Vector is Validly Encoded ## vector Vectors - Creation, Coercion, etc ## warning Warning Messages ## warnings Print Warning Messages ## weekdays Extract Parts of a POSIXt or Date Object ## which Which indices are TRUE? ## which.min Where is the Min() or Max() or first TRUE or ## FALSE ? ## with Evaluate an Expression in a Data Environment ## withVisible Return both a Value and its Visibility ## write Write Data to a File ## writeLines Write Lines to a Connection ## xtfrm Auxiliary Function for Sorting and Ranking ## zapsmall Rounding of Numbers: Zapping Small Ones to Zero ```