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

Problem in using read.table() by radian while it could be run normally in R gui #454

Open
SkrHo opened this issue Dec 21, 2023 · 2 comments

Comments

@SkrHo
Copy link

SkrHo commented Dec 21, 2023

After updating radian, when I used read.table() in a for loop, an error came up.

r$> for (i in 1:(length(files)))
{
x <- read.table(file = files[i], header = T, sep = ",", row.names = 1)
x <- x[, -c(2, 4, 5, 9, 12, 13)]
x <- t(x)
assign(filelist_sampled[i], x)
rm(x)
}
Error in read.table(file = files[i], header = T, sep = ",", row.names = 1) :
no lines available in input
In addition: Warning message:
In read.table(file = files[i], header = T, sep = ",", row.names = 1) :
invalid input found on input connection 'my file name'

This code could be used in the R GUI and old version of radian.

@SkrHo
Copy link
Author

SkrHo commented Dec 21, 2023

I already confirmed my csv files and their directory. Both should be OK.

@SkrHo
Copy link
Author

SkrHo commented Dec 22, 2023

It was the encoding problem.
I followed this issue and set the local encoding to UTF-8, problem solved.
https://github.com/randy3k/radian/issues/269

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

1 participant