Re: [R] incomplete final line found warning

2011-12-11 Thread Berend Hasselman
Xiaobo.Gu wrote > > Hi, > > I saved the following as a UTF-8 encoded file named amberutil.r > > as.factor.loop <- function(df, cols){ > > if (!is.null(df) && !is.null(cols) && length(cols) > 0) > { > for(col in cols) > { > df[[col]] <- as.fac

Re: [R] incomplete final line found warning

2011-12-11 Thread Xiaobo Gu
On Sun, Dec 11, 2011 at 5:03 PM, Prof Brian Ripley wrote: > On Sun, 11 Dec 2011, David Winsemius wrote: > >> >> On Dec 10, 2011, at 10:01 PM, Xiaobo Gu wrote: > > > without following the posting guide in several respects and hence leaving us > guessing > > >>> Hi, >>> >>> I saved the followin

Re: [R] incomplete final line found warning

2011-12-11 Thread Prof Brian Ripley
On Sun, 11 Dec 2011, David Winsemius wrote: On Dec 10, 2011, at 10:01 PM, Xiaobo Gu wrote: without following the posting guide in several respects and hence leaving us guessing Hi, I saved the following as a UTF-8 encoded file named amberutil.r BTW, it is hard to know how you know

Re: [R] incomplete final line found warning

2011-12-10 Thread David Winsemius
On Dec 10, 2011, at 10:01 PM, Xiaobo Gu wrote: Hi, I saved the following as a UTF-8 encoded file named amberutil.r as.factor.loop <- function(df, cols){ if (!is.null(df) && !is.null(cols) && length(cols) > 0) { for(col in cols) { df[

[R] incomplete final line found warning

2011-12-10 Thread Xiaobo Gu
Hi, I saved the following as a UTF-8 encoded file named amberutil.r as.factor.loop <- function(df, cols){ if (!is.null(df) && !is.null(cols) && length(cols) > 0) { for(col in cols) { df[[col]] <- as.factor(df[[col]]) }