Message-ID: <DDED025D-A7CA-41D7-A49A-3051169DDBA0@comcast.net>
Date: 2011-12-11T06:05:00Z
From: David Winsemius
Subject: incomplete final line found warning
In-Reply-To: <CACOCgc=JGM7cfnqU488tOudjCQP1q_CYAL_0YobFbxdivinOFA@mail.gmail.com>
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[[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?
Help with what? You got a warning. And it had information that should
tell you how to edit the file if the warning bothers you.
>
--
David Winsemius, MD
West Hartford, CT