[BioC] Errors in copy/paste

Claire Wilson ClaireWilson at picr.man.ac.uk
Tue Jun 17 17:46:41 MEST 2003


Dear all,

Hope this is the right place to post this message! 
I keep getting the following whenever I copy and paste functions/code into my R session on my linux box
A simple example...
this is part of what I want to copy and paste
 pscores.thresholds <- c(0.0001,0.0005,0.001,0.005,0.01, 0.05)
 for (i in 1:length(pscores.thresholds)) {
    x.pscores <- names(x1[x1 <= pscores.thresholds[i]])
    y.pscores <- names(y1[y1 <= pscores.thresholds[i]])
    # Get the fold changes for those probe names that pass the pscore filter
    x.fc <- x2[x.pscores]
    y.fc <- y2[y.pscores]
 }

this is what happens in R when I do..
> pscores.thresholds <- c(0.0001,0.0005,0.001,0.005,0.01, 0.05)
> for (i in 1:length(pscores.thresholds)) {
+    x.pscores <- names(x1[x1 <= pscores.thresholds[i]])
+    y.pscores <- names(y1[y1 <= pscores.thresholds[i]])
+
.RData           .Rhistory        random_txt_file
+ # Get the fold changes for those probe names that pass the pscore filter
+
.RData           .Rhistory        random_txt_file
+ x.fc <- x2[x.pscores]
+
.RData           .Rhistory        random_txt_file
+ y.fc <- y2[y.pscores]
+    }

Each line becomes interspersed with a listing of the files in the current directory. Now this doesn't seem to have any adverse effects, unless I do not have any files in the current directory except my .RData and .Rhistory.  When this happens, R encounters and error because it precedes each line with .R

> pscores.thresholds <- c(0.0001,0.0005,0.001,0.005,0.01, 0.05)
> for (i in 1:length(pscores.thresholds)) {
+ .R   x.pscores <- names(x1[x1 <= pscores.thresholds[i]])
Error: syntax error
> .R   y.pscores <- names(y1[y1 <= pscores.thresholds[i]])
Error: syntax error
> .R# Get the fold changes for those probe names that pass the pscore filter
Error: Object ".R" not found

and so on

the only work around I have found for this is to place a random text file in the working directory and this doesn't appear to cause any problems, however I just wondered whether anyone out there had any better suggestions.

Many thanks in advance

claire
 
--------------------------------------------------------

 
This email is confidential and intended solely for the use of th... {{dropped}}



More information about the Bioconductor mailing list