[R] sequence of commands in R

Jim Lemon jim at bitwrit.com.au
Mon Nov 30 07:05:56 CET 2009


On 11/30/2009 07:17 AM, Manuel Jesús López Rodríguez wrote:
> Dear all,
> I would like to know how could I execute a sequence or orders with just a function, i.e, that just typing the function name, R gives me all the parameters I want (for instance, if I want to see the summary, the standard deviation, the number of valid cases, etc of a dataframe just with one function). I have tried with the following, but just compute the second argument of the body, i.e., the summary:
>
> resumen<-function(x) {
> 	apply(x,2,sd,na.rm=TRUE)
> 	summary(x)
> 	}
>
>    
Hi Manuel,
This looks very much like one of the "alternative summary" functions. 
Three, all named "describe", can be found in the Hmisc, psych and 
prettyR packages.

Jim




More information about the R-help mailing list