for data.frame called dframe:
newframe <- dframe[ , lapply(dframe, is.numeric)]
For the mode of the columns
lapply(dframe, mode)
See ?lapply !!
> -Original Message-
> From: Vincent Spiesser [mailto:[EMAIL PROTECTED]
> Sent: 29 August 2003 10:08
> To: [EMAIL PROTECTED]
> Subject: [R] ex
On Fri, 29 Aug 2003, Vincent Spiesser wrote:
> Hi
>
> I try to create from a data frame a new one which contains only the
> numerical variables (or factorial ones).
>
> Is there any function which does this task directly ?
> Or, is there any function which return the mode of each columns of a d