Errors in copy/paste
1
0
Entering edit mode
Claire Wilson ▴ 280
@claire-wilson-273
Last seen 9.6 years ago
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}}
probe probe • 793 views
ADD COMMENT
0
Entering edit mode
Jeff Gentry ★ 3.9k
@jeff-gentry-12
Last seen 9.6 years ago
> 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 While not able to offer any useful advice, I can say that I was seeing this the other day. I'm not sure exactly which version of R that was but it isn't happening to me now so I suspect it is something that is fixed in 1.7.1.
ADD COMMENT

Login before adding your answer.

Traffic: 1016 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6