Message-ID: <CACOCgc=JGM7cfnqU488tOudjCQP1q_CYAL_0YobFbxdivinOFA@mail.gmail.com>
Date: 2011-12-11T03:01:47Z
From: Xiaobo Gu
Subject: incomplete final line found warning
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]])
}
}
df
}
And got this warning message,
> source('D:/ambertuil.r')
Warning message:
In readLines(file) : incomplete final line found on 'D:/ambertuil.r'
Can you help with this?
Regards,
Xiaobo Gu