[R] Questions

haugb002 at umn.edu haugb002 at umn.edu
Tue May 1 02:48:21 CEST 2012


Hello,

I am having difficulty putting a frequency table on my clipboard in R 
studio. I do not know what the error message is. I was thinking it might 
have to do with changing a setting on my clipboard but I do not know how to 
do this. I will copy and paste the exact command and error message:

write.table(dpx,"clipboard",sep="\t")
Error in file(file, ifelse(append, "a", "w")) : 
  'mode' for the clipboard must be 'r' on Unix

I was able to create a frequency table as a "value" in my workspace. 
However, I am trying to put it on my clipboard and then export it into 
excel. I copied and pasted some of the commands below that I was getting 
error messages for which may be helpful.

Once I am able to get the frequency table to show up on my workbook I was 
also wondering how to export it to excel and keep the same formatting 
(spaces between the different frequency tables)?

Thank you!

Lana


> getwd()
[1] "/Users/JoshandLana"
> dpx <- read.table(file.choose(), header = T, sep = "\t")
> #edit(dpx)
> View(dpx)
> freqTable <- table(dpx$ActorID,dpx$EmotionFaceTask.RESP,dpx$Emotion)
> write.table(dpx,"clipboard",sep="\t",col.names=NA)
Error in file(file, ifelse(append, "a", "w")) : 
  'mode' for the clipboard must be 'r' on Unix
> write.table(dpx,"clipboard",sep="\t")
Error in file(file, ifelse(append, "a", "w")) : 
  'mode' for the clipboard must be 'r' on Unix
> edit(dpx)
Error in dataentry(datalist, modes) : 
  Editing of matrix and data.frame objects is not currently supported in 
RStudio



More information about the R-help mailing list