Re: Question about writing a function in R



Disclaimer: I'm no expert statistician, but that rarely shuts me up.

Does the following not go some of the way to doing what you want to do?

> dat <- function( x )
+ {
+ c( mean( x ), sd( x ))
+ }
> dat( c( 1, 2, 3, 4 ))
[1] 2.500000 1.290994
>

Cheers,

Ross-c

.



Relevant Pages