[R] r help

jim holtman jholtman at gmail.com
Wed Mar 18 18:30:40 CET 2015


Works fine for me.  The error message just means that the last line did not
end with a 'new line' character:


> x <- as.matrix(read.table("/temp/td.txt"))
Warning message:
In read.table("/temp/td.txt") :
  incomplete final line found by readTableHeader on '/temp/td.txt'
>   data<-list(N1=2000,N2=2000,P=9,x)
>
> data
$N1
[1] 2000

$N2
[1] 2000

$P
[1] 9

[[4]]
       V1     V2     V3     V4    V5  V6
[1,] -200 -2.517 -1.245 -0.444 0.848 200
[2,] -200 -1.447 -0.420  0.119 1.245 200
[3,] -200 -1.671 -0.869 -0.194 0.679 200
[4,] -200 -1.642 -0.869 -0.293 0.332 200
[5,] -200 -1.671 -0.827  0.052 0.756 200



Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

On Wed, Mar 18, 2015 at 1:12 PM, thanoon younis <thanoon.younis80 at gmail.com>
wrote:

> Dear all members
>
> I have error with the following code
>
> #Input data set
>      thd <- as.matrix(read.table("C:/Users/hp/Desktop/thd.txt"))
>
>     #Input data set
>     data<-list(N1=2000,N2=2000,P=9,R=Ro,z1=yo1,z2=yo2,thd)
>
> and the the matrix
>
> -200.000 -2.517 -1.245 -0.444  0.848 200.000
> -200.000 -1.447 -0.420  0.119  1.245 200.000
> -200.000 -1.671 -0.869 -0.194  0.679 200.000
> -200.000 -1.642 -0.869 -0.293  0.332 200.000
> -200.000 -1.671 -0.827  0.052  0.756 200.000
>
> thd matrix saved as a text file, i have the following errors
>
> In read.table("C:/Users/hp/Desktop/thd.txt") :
>  incomplete final line found by readTableHeader on
> 'C:/Users/hp/Desktop/thd.txt'
>
> The thd matrix didn't appear in the results, so i hope anyone can help me
> to solve this problem.
>
> Many thanks in advance
>
> --
> Thanoon Y. Thanoon
> PhD Candidate
> Department of Mathematical Sciences
> Faculty of Science
> University Technology Malaysia, UTM
> E.Mail: Thanoon.younis80 at gmail.com
> E.Mail: dawn_prayer80 at yahoo.com
> Facebook:Thanoon Younis AL-Shakerchy
> Twitter: Thanoon Alshakerchy
> H.P:00601127550205
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list