How to Import MS Excel Data into R | /en/2009/09/how-to-import-ms-excel-data-into-r/
How to Import MS Excel Data into R
https://yihui.org/en/2009/09/how-to-import-ms-excel-data-into-r/
https://yihui.org/en/2009/09/how-to-import-ms-excel-data-into-r/
Guest *doug* @ 2009-09-29 23:07:07 originally posted:
Or you could use read.xls from the gdata library.
Sure! Thanks for your reminding! ;-)
Originally posted on 2009-09-30 02:54:04
Guest *yixuan* @ 2009-10-14 06:56:35 originally posted:
I remember that using read.xls() in gdata packages requires Perl in your system, but there is a package named xlsReadWrite that can read xls directly. Because this package is not fully "open source", it was removed from CRAN, but you can get it from this website: http://treetron.googlepages.com/.
Guest *Zhaonn* @ 2012-07-29 19:42:12 originally posted:
Ohe, this URL is failed
see http://cran.r-project.org/web/packages/xlsReadWrite/
Originally posted on 2012-08-04 23:30:38
Guest *james* @ 2010-03-26 20:29:24 originally posted:
the problem isnt that I use excel, it's that I have to deal with other people who behave as if excel is an acceptable format.
xlsReadWrite requires that you have a licensed copy of xcel. why would I have that? :)
and excelent (no pun intended) of the lowest common denominator principle...
Guest *haile* @ 2011-02-16 20:08:35 originally posted:
how are you?
Execuse me;
I want to import the given data from other statistical software to R.how can I do it?
example from Minitab;SPSS to R
thanks very much!
Guest *nadia* @ 2011-06-04 14:19:04 originally posted:
hello, i have a question plz:
I wanna import my data from excel (.xlsx°? So i downloaded the package "xlsx"; but when i try to import my data, i get un error: i should specify the sheet , how can i do it??
Guest *JM* @ 2011-08-02 00:08:36 originally posted:
I am new to using R Good tutorial. Though, I am not sure it makes sense to dump on the idea of using Excel completely, being that through Excel is the only way that many people will have interacted with matrices or strings of numbers.
It would be great to have your suggestions on how to import a half matrix, or full matrix (in Excel form, OR .csv) into R, such that the data "arrives" as a fully function x/y vector, and not a list, or a series of row vectors with ("col1", "col2", "col3"...) compressed as strings of form "...". It's amazing how troublesome this is turning out to be. In general people are comfortable with the .csv file format and less comfortable with subtle shifts between data types that happen on the R screen. Make sense?
Thanks for your input!
I'm not sure if I completely understand what you mean. To input the CSV file as a single vector in R, you can use the function scan().
Originally posted on 2011-08-10 02:13:11
Guest *MJS* @ 2011-09-12 08:13:03 originally posted:
Hi I haven't used R much before. i have looked up a few manuals but can't find what I'm looking for.
I want to use a matrix for contrast analysis. It's a large matrix 20x20 and because I'm new to R I created the matrix as a table in excel and saved as a csv file. I want to know how I can import or read the csv file as matrix in the format which I can then use in R.
I believe you can use read.csv() directly, or see the comment below to know how to read data from clipboard, which sounds even easier.
Originally posted on 2011-10-04 05:49:10
Guest *Kallie Barnes* @ 2011-09-22 10:09:09 originally posted:
Check out this website! The scan function is amazing for getting Excel data into R. I tried a bunch of different methods but the scan function was by far the easiest and most straight forward.
It's simple
1)copy the *COLUMN of values from excel. *Note it must be a column of data.
2) In R type x <- scan() then press enter. Number 1 will appear on the next line.
3) Now copy the selected data into R and hit enter after it transfers all the copied data.
There you go...it's all there.
Repeat for the y variable, or whatever else you have.
Useful hints. Thanks a lot!
Originally posted on 2011-10-04 05:49:49
Guest *Zohre* @ 2014-05-06 21:12:13 originally posted:
Thank you so much for you help ...
Guest *MartinInFrankfurt* @ 2011-10-21 23:48:01 originally posted:
The problem with excel is that you have to fumble in the OS regional options to specify the list separator and the decimal separator.
R on my Linux-PC has no method to detect this configuration.
In this respect, I have found read.xls from the gdata packages useful. It does call Perl in the background but I have not had to bother with regional setting since I am using this program.
Guest *Poghosyan* @ 2012-08-02 16:51:02 originally posted:
THere is a problem, when I transfere my ecell file into txt it appears like this Stock_Code Member2000
AANM Abrahamyan_Marat
AMEX Nikoghosyan Raffi
or if it is csv then it separte two colomns with ;
but when I input this format into R I could not get normal matrix
may be I transfer Excel file into csv or txt wrongly ?
If the data is separated by ; you can also read it by read.table(..., sep = ';'), or just use read.csv2()
Originally posted on 2012-08-04 23:28:35
Guest *excel training* @ 2012-10-08 13:18:53 originally posted:
This is great stuff about importing data from excel. Excel is very good platform to making spreadsheet,account sheet and formula calculation.
Guest *Dtslc* @ 2012-12-12 16:18:31 originally posted:
well, you left out how to address the files. I've spent 30 minutes trying to get the various commands to find the files and it can't. that includes when i use the "lazy" clipboard approach. here's what I mean: no2 <- read.table("C:2011datarat data example ethylbenzene.txt", header = true)
Error: 'd' is an unrecognized escape in character string starting "C:2011d"
double , i.e. or use one forward slash /
Originally posted on 2012-12-12 18:39:16
Guest *Doughlasmarker* @ 2013-02-20 11:32:59 originally posted:
you not making any sense at all sir.
Guest *Sean* @ 2013-05-14 18:31:42 originally posted:
wait...did you ever describe how to import excel data? an example would be nice. knowing what functions are related to the task isn't helpful for those unfamiliar with R.
Guest *Susana Freire* @ 2013-07-06 16:54:11 originally posted:
Besides useful information, I loved you tone in this article!
Guest *abraham.lagat* @ 2013-07-19 06:16:23 originally posted:
And is I do not want a variable to considered a factor especially in the case of a very large dataset with few distinct values. I was used the xlsReadWrite package with the option stringsAsFactors=F
Guest *Donovan Hutchinson* @ 2013-07-23 12:15:31 originally posted:
Thanks for the info! The XLConnect package, as well as the RExcel package (if you want truly a truly integrated experience) have both been particularly useful to me :).
Guest *tig* @ 2013-12-14 23:50:34 originally posted:
http://www.dummies.com/how-to/content/how-to-read-data-from-excel-into-r.html
I used to this and importing from excel to R with in 2 minutes
Guest *yusmizan* @ 2014-06-30 06:20:35 originally posted:
hello..i am still don't know how to import the excel file into R, even I followed the instruction from others...may I lack of something
It was written four years ago when I was a fool. Perhaps I'm a tiny bit wiser now, but I no longer have much time on this topic, and Excel only exists in my memories now. Sorry for being unhelpful!
Originally posted on 2013-09-06 05:04:03
Sign in to join the discussion
Sign in with GitHub