Re: [R] reading table

From: Sharpie <chuck_at_sharpsteen.net>
Date: Wed, 02 Dec 2009 22:37:10 -0800 (PST)

Theodore Kengne wrote:
>
> Hi there,
>
> I am completely new in R.
> I am trying to read a table that has no feature, so cannot put it in Excel
> as usual.
>

Could you explain what you mean by "has no feature"? I cannot figure out what this phrase means in relation to the data set you are trying to work with.

Theodore Kengne wrote:
>
> I saved it as a txt file on the same root as my R program with the name
> pro.txt.
> Now I am looking to import it in my program as a matrix by excluding the
> column titles, and the rows number.
> I tried this A <- read.table("pro.txt",header = T), but did not work
>
>
> Thanks
>

What kind of text file did you save? Tab delimited? Space Delimited? Comma Seperated Value (CSV)? Each of these formats affects the arguments you will have to pass to read.table() in order for the function to read the data correctly.

Additionally, you may want to take a look at the "R Data Import/Export" manual:

  http://cran.r-project.org/doc/manuals/R-data.html

Since you are new to R, this will help familiarize you with some of the ways data can be imported.

Good luck and welcome to the community!

-Charlie

-- 
View this message in context: http://n4.nabble.com/reading-table-tp947390p947391.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
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.
Received on Thu 03 Dec 2009 - 06:56:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Dec 2009 - 09:00:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive