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
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
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
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:
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
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
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
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
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
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.
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
11 matches
Mail list logo