apply - apply cfw_base R Documentation Apply Functions Over...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
apply {base} R Documentation Apply Functions Over Array Margins Description Returns a vector or array or list of values obtained by applying a function to margins of an array or matrix. Usage apply(X, MARGIN, FUN, . ..) Arguments X an array, including a matrix. MARGIN a vector giving the subscripts which the function will be applied over. 1 indicates rows, 2 indicates columns, c(1,2) indicates rows and columns. FUN the function to be applied: see ‘Details’. In the case of functions like + , %*% , etc., the function name must be backquoted or quoted. ... optional arguments to FUN . Details If X is not an array but has a non-null dim value, apply attempts to coerce it to an array via as.matrix if it is two-dimensional (e.g., data frames) or via as.array . FUN is found by a call to match.fun and typically is either a function or a symbol (e.g. a backquoted name) or a character string specifying a function to be searched for from the environment of the call to apply . Value
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/14/2011 for the course STATS 102A 102A taught by Professor Jandeleeuw during the Fall '10 term at UCLA.

Page1 / 2

apply - apply cfw_base R Documentation Apply Functions Over...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online