Skip to content
Prev 85872 / 398503 Next

novice questions about programming in "R"

Dear Richard,
One way to do this is

Data <- cbind(A,B)
rownames(Data) <- paste("[line ", 1:4, "]", sep="")
write.table(formatC(Data, digits=7, format="f"), 
    file="c:/temp/test.txt", col.names=FALSE, quote=FALSE)

[Note that the two vectors are not lists and are not equal. If you don't
really want the line numbers in the file, then omit the second command and
use the argument row.names=FALSE to write.table().]
plot(x, y, log="xy")

[I assume that you don't want the graph-paper grid, though you could add
that with abline(h=values, v=values, col="gray") if you do.]

I hope this helps,
 John