Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve this problem for following function,please!! #16

Open
y1239051 opened this issue Jun 23, 2013 · 1 comment
Open

How to solve this problem for following function,please!! #16

y1239051 opened this issue Jun 23, 2013 · 1 comment

Comments

@y1239051
Copy link

I have problem in following code:

get.msg <- function(path)
{
con <- file(path, open = "rt", encoding = "latin1")
text <- readLines(con)

The message always begins after the first full line break

msg <- text[seq(which(text == "")[1] + 1, length(text), 1)]
close(con)
return(paste(msg, collapse = "\n"))
}

How can i do , please some body help me!!

stedy pushed a commit to stedy/ML_for_Hackers that referenced this issue Nov 26, 2013
@stedy
Copy link

stedy commented Nov 26, 2013

Previous commit only resolves the issue if running on Windows, commit introduces new error on linux/os x:
Error in tolower(txt) : invalid multibyte string 1

Likely has to do with line ending encodings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants