[R] Reading one column .csv file

David L Carlson dcarlson at tamu.edu
Thu Aug 16 05:56:59 CEST 2012


On the Mac try pipe("pbpaste") instead of "clipboard."

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of darnold
> Sent: Wednesday, August 15, 2012 4:11 PM
> To: r-help at r-project.org
> Subject: Re: [R] Reading one column .csv file
> 
> Peter,
> 
> Interesting. Never heard of copying from the clipboard. I am also on a
> MacBook Pro, but I cannot get it to work.
> 
> 1. I selected the column of data (including the header) in Excel.
> 
> 2. Selected Edit->Copy.
> 
> 3. In R, tried:
> 
> > a <- read.delim("clipboard")
> Error in file(file, "rt") : cannot open the connection
> In addition: Warning message:
> In file(file, "rt") : clipboard cannot be opened or contains no text
> 
> 4. I checked the clipboard. The data is there.
> 
> What am I missing?
> 
> D.
> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Reading-
> one-column-csv-file-tp4640396p4640429.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list