Re: [R] how to import data from excel to R

2012-11-14 Thread Flavio Barros
Simple: > install.packages('xlsx') > setwd('C://) (Define directory with your file) > data <- read.xlsx('file.xlsx', 1) (Read the first spreed sheet) On Wed, Nov 14, 2012 at 3:25 PM, jim holtman wrote: > Also checkout the XLConnect package since it can read/write EXCEL > files directly so that

Re: [R] how to import data from excel to R

2012-11-14 Thread jim holtman
Also checkout the XLConnect package since it can read/write EXCEL files directly so that you do not have to go through the step of creating a CSV file. Really nice when you want to create an Excel file with multiple worksheets containing different phases of your analysis. On Wed, Nov 14, 2012 at

Re: [R] how to import data from excel to R

2012-11-14 Thread shwetank
The simplest way, in my opinion is: >save .xls file as .csv in ms excel "save as" option. csv means comma delimited. >now type following command on R console; >mydata<-read.csv(file.choose()) this will open a dialog box will open and select your .csv file. now the data

Re: [R] how to import data from excel to R

2009-12-17 Thread Steve Taylor
Or copy a rectangle of data in Excel, then grab it from the clipboard in R as follows: my.data <- read.table("clipboard",head=TRUE,sep='\t') cheers, Steve [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:

Re: [R] how to import data from excel to R

2009-12-17 Thread Charlie Sharpsteen
On Thu, Dec 17, 2009 at 9:24 AM, wrote: > > Hi, >   I am using R and I want to know how data can be transferred from Excel > Spread sheet to R for analyzing. I have done like this > > mydata<-read.table("C:\Documents and Settings\admin\Desktop\data.txt"); > > > but its not working how can i do it

Re: [R] how to import data from excel to R

2009-12-17 Thread Gabor Grothendieck
Check out these notes: http://wiki.r-project.org/rwiki/doku.php?id=tips:data-io:ms_windows and note that within quotes you must double each backslash so one writes "c:\\mydirectory\\abc.xls" for example. On Thu, Dec 17, 2009 at 12:24 PM, wrote: > Hi, >   I am using R and I want to know how dat

Re: [R] how to import data from excel to R

2009-12-17 Thread David Winsemius
On Dec 17, 2009, at 11:24 AM, sta_2...@spectrum.net.in wrote: Hi, I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing. I have done like this mydata<-read.table("C:\Documents and Settings\admin\Desktop \data.txt"); but its not working

Re: [R] how to import data from excel to R

2009-12-17 Thread milton ruser
Hi Sarath, try "C:\\Documents and Settings\\admin\\Desktop\\data.txt" or "C:/Documents and Settings/admin/Desktop/data.txt" or yet setwd("your path") mydata<-read.table("data.txt") cheers miltinho On Thu, Dec 17, 2009 at 12:24 PM, wrote: > Hi, > I am using R and I want to know how data can

Re: [R] how to import data from excel to R

2009-12-17 Thread Joshua Wiley
Hey, If you want to read it in as a text file, make sure to have Excel save it as a text file first. For instance, a tab delimited text file. Then you could read it in with mydata <- read.table("myfile.txt", sep="\t") HTH, Josh On Thu, Dec 17, 2009 at 9:24 AM, wrote: > Hi, > I am using R

Re: [R] how to import data from excel to R

2009-12-17 Thread Richardson, Patrick
o:r-help-boun...@r-project.org] On Behalf Of sta_2...@spectrum.net.in Sent: Thursday, December 17, 2009 12:25 PM To: r-help@r-project.org Subject: [R] how to import data from excel to R Hi, I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing.

[R] how to import data from excel to R

2009-12-17 Thread sta_2279
Hi, I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing. I have done like this mydata<-read.table("C:\Documents and Settings\admin\Desktop\data.txt"); but its not working how can i do it