Re: [R] novice questions about programming in "R"

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Tue 07 Feb 2006 - 09:01:13 EST

Try this:

	write.table(sprintf("%10.5f%10.5f", A, B), file = "myfile.dat",
		quote = FALSE, row = FALSE, col = FALSE)

	plot(1:100, 1:100, log = "xy")
	grid()  # only if you want a grid


?plot.default has info on the log= argument. Use ? with the other commands to find out more about them.

On 2/6/06, Richard Evans <revans@jlab.org> wrote:
> folks,
>
> I have been struggling with the "R" documentation for too long now and
> I need a simple answer on two questions. The documentation does not
> have adequate examples. Please help.
>
> given two equal vector lists:
> A <- c(0,1,2,3)
> B <- c(5,6,7,8)
>
> [Question #1]
> how do I dump them to a text file with the following format:
> ------------------------------------------------------------
> [line 1] 0.0000000 5.0000000
> [line 2] 1.0000000 6.0000000
> [line 3] 2.0000000 7.0000000
> [line 4] 3.0000000 8.0000000
> ------------------------------------------------------------
>
> [Question #2]
> ------------------------------------------------------------
> how do you make log-log plot that looks
> like it was plotted on log-log graph paper?
> ------------------------------------------------------------
>
> many thanks,
> - revansx
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 07 09:07:52 2006

This archive was generated by hypermail 2.1.8 : Wed 08 Feb 2006 - 01:32:46 EST