On 07/13/2011 08:16 PM, Kishore Kumar wrote:
Dear Steven,
           Many thanks for your reply. I am struggling to read the all the
values. I have 20 columns for 200 rows in my excel sheet, which i want to
read for plotting. Please let me know how to load or import or read those
columns.

Hi Kishore,
Starting with your spreadsheet in Excel:

File - Save As
Click on the "File type" drop down list and select "CSV"
Save the file as "xlss.csv"
Click on OK and note where the file is saved

From R:

setwd(to where the file was saved)
# if the uppermost row had labels for the columns
df20<-read.csv("xlss.csv")
# if the uppermost row was not labels
df20<-read.csv("xlss.csv",header=FALSE)

You should now have a 200x20 data frame named "df20".

Jim

______________________________________________
R-help@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.

Reply via email to