Hi

On 3 Mar 2004 at 11:25, Grace Conlon wrote:

> In R, How to read Excel file and access the data item?
> Thank you.

Quite strightforward way is to copy your data to notepad, save to 
a txt file and read this txt file to r by appropriate read.table() 
command.

Or you can use coppying through clipboard (with some 
restrictions) by this function.

readClip<- function(n=3, header=T)
{

vstup<-readClipboard()


if (header) {
jmena<-vstup[1]
vstup<-vstup[-1]
jmena<-as.character(unlist(strsplit(jmena,split="[[:space:]]")))

}

vystup<-
data.frame(matrix(as.numeric(unlist(strsplit(vstup,split="[[:space:]
]"))),length(vstup),n,byrow=T))

if (header) names(vystup)<-jmena

vystup

}

where n is number of columns you want to copy.






> 
> 
> ---------------------------------
> 
> Yahoo! Search - Find what you?re looking for faster.
>  [[alternative HTML version deleted]]
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to