[R] the name of the current running script.r

2008-08-14 Thread Zroutik Zroutik
Dear R users, is there a hack how to get the filename of the current script.r sourced/ran? My issue: I have a couple of scripts which were optimised and are placed in tens of directories. (I have a height.r script in 30 directories, a lines.r script in 25 directories and another flow.r script in

Re: [R] A comprehensive manual on "How to plot" (a lot of graphical examples welcome)

2008-08-11 Thread Zroutik Zroutik
Yes! This is a type of manual I was looking for. Thank you so much. I see I'll spend the whole night "out-sourcing" ideas and possibilities :D On Mon, Aug 11, 2008 at 2:53 PM, Ben Tupper <[EMAIL PROTECTED]>wrote: > > On Aug 11, 2008, at 8:38 AM, Zroutik Zroutik wrote:

[R] A comprehensive manual on "How to plot" (a lot of graphical examples welcome)

2008-08-11 Thread Zroutik Zroutik
Hi, I'm looking for a manual (we based or pdf) which would explain in detail with graphical examples what all the option can do in plot and par. Does anybody now anything like this? A couple of manuals to R I went through do have plot parameters mentioned, but sometimes it is hard to understand or

Re: [R] line with of the symbols in the legend -- changable?

2008-08-11 Thread Zroutik Zroutik
OK, sorry, I misread the help page: pt.lwd does what was requested below. Zroutik On Mon, Aug 11, 2008 at 2:16 PM, Zroutik Zroutik <[EMAIL PROTECTED]> wrote: > Dear R users, > > I plot data with > > points(my_data[x]~x, col = x, type = "o", lwd="4") >

[R] line with of the symbols in the legend -- changable?

2008-08-11 Thread Zroutik Zroutik
Dear R users, I plot data with points(my_data[x]~x, col = x, type = "o", lwd="4") where x is an integer running from 1 to 10, I get points drawn at the plot. When want to do a legend to this I try legend(leg.txt[x], col = x, text.col = 1, pch = 1, bty = "n") where leg.txt contains the names of

Re: [R] creating axis of the plot before data are plotted -- solved

2008-07-15 Thread Zroutik Zroutik
2008 at 12:18 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > why don't you give us a snippett of your data and then we may be able to > help (read the posting guide) > > > On Mon, Jul 14, 2008 at 6:04 PM, Zroutik Zroutik <[EMAIL PROTECTED]> > wrote: > >> No

Re: [R] creating axis of the plot before data are plotted

2008-07-14 Thread Zroutik Zroutik
Sorry for confusion. On Mon, Jul 14, 2008 at 5:53 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > try at=seq(from=26, to=32, by=2) in the axis statment > hope this helps > > Stephen > > On Mon, Jul 14, 2008 at 11:21 AM, Zroutik Zroutik <[EMAIL PROTECTED]> > wrote:

[R] creating axis of the plot before data are plotted

2008-07-14 Thread Zroutik Zroutik
Dear R-users, I'm tackling with a problem which causing me a head-ache for a long time. I would like to create a nice x-axis to my plots, but I do not know how to implement the method. Imagine a matrix where you have rownames real numbers -- these rownames should be written in the x-axis nicely.

[R] ampersand char in the path causing error message when running rscript.bat

2008-07-14 Thread Zroutik Zroutik
Dear users, is anybody able to reproduce the following behaviour? I have two copies of my project with the .rhistory files in a directory with and without ampersand a) d:\calc\foo1 & foo2 foo3\ b) d:\calc\foo1 - foo2 foo3\ I'm running "rscript .rhistory" in the dir. At the case a) I'm getting a f

Re: [R] Turn any vector

2008-07-10 Thread Zroutik Zroutik
> [1] 10 9 8 7 6 5 4 3 2 1 > > G. > > On Thu, Jul 10, 2008 at 01:56:58PM +0200, Zroutik Zroutik wrote: > > Dear R-users, > > > > I'd like to turn a vector so it starts with it's end. For better > > understanding, this set of commands will do

[R] Turn any vector

2008-07-10 Thread Zroutik Zroutik
Dear R-users, I'd like to turn a vector so it starts with it's end. For better understanding, this set of commands will do what I need: i <- seq(1:10) i_turned <- i for (j in 1:length(i)) i_turned[j] <- i[length(i)-j+1] now, i_turned is what I call turned. Is there a function which would make a

[R] Fit a sine to data

2008-05-23 Thread Zroutik Zroutik
Dear R-users, I'd like to fit a sine function to my data. The result should have a format (and thus the formula, too) y ~ a + sin(x+b) where y and x are vectors, and a and b are (yet) unknown values. The data sets (vectors x and y) are OK, and I can do a simple lm fitting lm(y~x), or lm(y~I(sin