Skip to content

paste data into R

8 messages · Sylvain Charlat, Simon Urbanek, Andrew Beckerman +2 more

#
Hi,

Does anybody know how to copy / paste data from Excel to R?

If I type the following:
or
I get an error message:
Thanks,

Sylvain.






	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
#
Sylvain,
On Jan 9, 2006, at 5:46 PM, Sylvain Charlat wrote:

            
Wrong connection, you should use pipe("pbpaste") - see ?pipe - so in  
your example it could look like this:

read.table(pipe("pbpaste"),sep="\t")

Cheers,
Simon
#
Sylvain/Simon -

Is it worth pointing out that read.csv("path/to/file.csv") will read  
the excel data in directly (as a saved as a csv file that is),  
without resorting to the clipboard and copy/paste mode?

Andrew
On 9 Jan 2006, at 22:57, Simon Urbanek wrote:

            
------------------------------------------------------------------------ 
---------
Dr. Andrew Beckerman
Department of Animal and Plant Sciences, University of Sheffield,
Alfred Denny Building, Western Bank, Sheffield S10 2TN, UK
ph +44 (0)114 222 0026; fx +44 (0)114 222 0002
http://www.shef.ac.uk/beckslab
------------------------------------------------------------------------ 
----------
#
On Jan 10, 2006, at 3:27 AM, Andrew Beckerman wrote:

            
Well I would think that such work-around is obvious and unless you  
happen to already have such a file it's more clumsy. (Personally, I  
avoid the use of csv because Excel loves to screw it up depending on  
your locale settings).

Cheers,
Simon
2 days later
#
Another option, that I personally prefer, is read.xls(), from a 
package whose name I don't have available at the moment. Might be 
'foreign'.

I have used it only when the data in the spreadsheet starts in the 
upper left-hand cell (A1), but in that case it works very well.

-Don
At 11:03 AM -0500 1/10/06, Simon Urbanek wrote:
#
Thanks. This is in the 'gdata' package. But copy paste is good when you just
want a subset your big files.
Sylvain.
On 12/01/06 08:54, "Don MacQueen" <macq at llnl.gov> wrote:

            
---------------------------------------------------------------
Sylvain Charlat
s.charlat at ucl.ac.uk / sylvaincharlat at yahoo.fr
http://www.ucl.ac.uk/~ucbtghu/Sylvain.htm
- Department of Biology, University College London
  4 Stephenson Way, London, NW1 2HE, UK
- Fieldwork address:
  Gump Station, University of California Berkeley
  BP 244 Maharepa, 98728 Moorea, French Polynesia
- Phone (Moorea): (+689) 56 43 97 or 26 90 18 or 56 52 87
- Fax (Moorea): (+689) 56 32 72
- Phone / Fax (London): (+44)20 76795072 / +(44) 20 76795052
---------------------------------------------------------------




	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
13 days later
#
Hi,

Is there any simple way to get histogram for different levels of factor?

Say you have the following data set:
  
 Island Sp.diam  
 Moorea 1.21  
 Moorea 1.27  
 Moorea 1.28  
 Moorea 1.22  
 Moorea 1.28  
 Rurutu 1.5  
 Rurutu 1.67  
 Rurutu 1.75  
 Rurutu 1.55  
 Rurutu 1.7  
 Rurutu 1.55  
 Rurutu 1.59  
 Rurutu 1.66  
 Rurutu 1.7

Is there anything better than:
followed by
Sorry for this very stupid and basic question...

Thanks for any help,

Sylvain.

---------------------------------------------------------------
Sylvain Charlat
s.charlat at ucl.ac.uk / sylvaincharlat at yahoo.fr
http://www.ucl.ac.uk/~ucbtghu/Sylvain.htm
- Department of Biology, University College London
  4 Stephenson Way, London, NW1 2HE, UK
- Fieldwork address:
  Gump Station, University of California Berkeley
  BP 244 Maharepa, 98728 Moorea, French Polynesia
- Phone (Moorea): (+689) 56 43 97 or 26 90 18 or 56 52 87
- Fax (Moorea): (+689) 56 32 72
- Phone / Fax (London): (+44)20 76795072 / +(44) 20 76795052
---------------------------------------------------------------




	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
#
The list of your interest is R-help not R-sig-mac
stefano

Il giorno 26/gen/06, alle ore 01:20, Sylvain Charlat ha scritto: