Re: [R] Strange labels on plot with dates

2007-04-03 Thread Henrik Andersson
;) dates <- seq(startdate,enddate,by="week") daynr <- as.numeric(julian(dates,origin=dates[1])) yvar <- sin(daynr*2*pi/365) plot(yvar~dates,type='l') dev.off() - Henrik Gabor Grothendieck wrote: What version of R are you using? When I copy and paste that into R 2.4.1

[R] Strange labels on plot with dates

2007-04-03 Thread Henrik Andersson
"2001-01-01",format="%Y-%m-%d") enddate <- strptime("2006-12-31",format="%Y-%m-%d") dates <- seq(startdate,enddate,by="month") daynr <- as.numeric(julian(dates,origin=dates[1])) yvar <- sin(daynr*2*pi/365) plot(yvar~dates,type='

Re: [R] Plot degree symbol by itself

2007-03-29 Thread Henrik Andersson
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 > and provide commented, minimal, self-contained, reproducible code. > -- Henrik Andersson Danish Meteorological

Re: [R] main title in multi-plot

2007-03-26 Thread Henrik Andersson
Use par(oma) for outer margins and then title with outer=TRUE or mtext in the same way. x<-1:100 y<-x z<-y/x w<-exp(z) par(oma=c(0,0,2,0)) par(mfrow=c(2,2)) plot(y~x) plot(z~x) plot(w~x) plot(z~w) title(main="Main title",outer=T) - Henrik Milton Cezar Ribeiro wrote: > Dear R-gurus, > > I need

Re: [R] Get "home" directory and simple I/O

2007-03-23 Thread Henrik Andersson
ilman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html and provide commented, minimal, >> self-contained, reproducible code. >> > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.c

Re: [R] solve equations

2006-03-30 Thread Henrik Andersson
It is probably very well explained in a basic math book which you either own or can borrow at many libraries. The method is called substitution and you most probably dont get much help or insight from R. If it is a linear equation system with more unknowns use the function 'solve' which you wo

[R] strsplit with dataframes

2005-12-22 Thread Henrik Andersson
t1 5 A1 B20 t2 10 ... This must surely be done easily, but there are not an example like this in ?strsplit Cheers, - Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Ye

[R] Seven month time-series sampled at hourly intervals

2005-12-02 Thread Henrik Andersson
27; how to use hourly data. I guess this is routine-work for a lot of people so I hope someone can point me in the right direction. ----- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yer

Re: [R] Long lines with Sweave

2005-09-14 Thread Henrik Andersson
Jan T. Kim wrote: > On Wed, Sep 14, 2005 at 10:14:59AM +0200, Henrik Andersson wrote: > >>I have used Sweave a lot the latest year, but never really used any long >>function calls. >> >> >>

[R] Long lines with Sweave

2005-09-14 Thread Henrik Andersson
exactly as entered but why is the '-3' on a line of it's own? Can anyone suggest a idea to how I can make this more readable. --------- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140

Re: [R] Plot of multiple data sets

2005-09-07 Thread Henrik Andersson
ot each time. > > > Thank you very much if you can help ! > > __ > 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 > -- --

Re: [R] sort a table

2005-07-26 Thread Henrik Andersson
$tmp),] n tmp s 3 3 213 0 1 1 215 0 7 7 252 0 8 8 555 0 6 6 562 1 4 4 569 1 2 2 654 1 5 5 954 1 9 9 988 1 Happy? Cheers, Henrik Andersson __ 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

Re: [R] Plot zooming i.e. changing ylim according to xlim

2005-07-26 Thread Henrik Andersson
>>Dear R-gurus, >> >>I would like to zoom in a plot, e.g. I select a region on the >>x-axis and >>then I would like the ranges on the y-axis to change accordingly. >> >>Is it possible to do this with existing functions, or do I have to >>invent some data selection before plotting? >> >>See below

[R] Plot zooming i.e. changing ylim according to xlim

2005-07-26 Thread Henrik Andersson
, where I select ylim with trial and error, which I want to avoid. Cheers, Henrik Andersson ## Example -- in reality more numbers, no function x <- seq(0,20) y <- exp(-x) plot(y~x,type='l') ## Zoom in the en

Re: [R] adding a factor column based on levels of another factor

2005-07-12 Thread Henrik Andersson
First create a dataframe with the translation you want, i.e. one column with the species and another with the number you want in the end. Then merge these two dataframes using 'merge' and voila.. I would start with looking at ?merge Cheers, Henrik Andersson Karen Kotschy wrote: &g

Re: [R] R on kubuntu

2005-07-11 Thread Henrik Andersson
gt;I am planning to redeploy my workstation under KUBUNTU. >> >>Does any body has any r experience installing/using r on this platform? >> >>Best regards. > > -- - Henrik Andersson Netherlands Institute of Ecology - Cent

[R] usign system() both quietly and quickly

2005-06-03 Thread Henrik Andersson
ESS/Emacs -- platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2 minor1.0 year 2005 month04 day 18 language R ----- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine

[R] Formatting numbers with a limited amount of digits consistently

2005-05-30 Thread Henrik Andersson
something? ----- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 577473 [EMAIL PROTECTED] http://www.nioo.knaw.nl/ppages/handersson __

[R] Output from function to a tcltk window

2005-02-04 Thread Henrik Andersson
- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 577473 [EMAIL PROTECTED] http://www.nioo.knaw.nl/ppages/handersson __ R-help

Re: [R] plot function

2005-01-26 Thread Henrik Andersson
-project.org/posting-guide.html -- - Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 577473 [EMAIL PROTECTED] http://www.nioo.knaw.nl/ppages/handersson

Re: [R] spreadsheet addiction

2005-01-14 Thread Henrik Andersson
I am moving to using R more and more as a computational platform and I use Microsoft Excel at the moment in exactly the way you describe in WRITING ASCII FILES as a staging area for data, to gather data and make simple calculations. I've have experienced problems with saving to .csv files, and n

Re: [R] Questions on Inserting R graphs in latex!

2005-01-14 Thread Henrik Andersson
An additional problem separate from it not recognizing the figure environment is that I guess you ran pdflatex (to get a .pdf file and not a .dvi) and this indeed accepts only files in the formats below. Try: pdf(file="c:/myfigure.pdf") plot(sin(1:10), pch="+") dev.off() Xianggui QU wrote: Hi, .

[R] Setting the width and height of a Sweave figure

2005-01-13 Thread Henrik Andersson
s the parameters for the figures, and right now the default behavior causes this figure to be square and the subfigures becomes not no square, making them look silly. I want a general solution so my function can be used in both interactive mode and in a sweave file. Thanks, Henrik Ande

Re: [R] Create a plot legend in a new window

2004-12-09 Thread Henrik Andersson
d be welcome. Thanks Mick __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- --------- Henrik Andersson Neth

Re: [R] How to change x axes' range

2004-12-08 Thread Henrik Andersson
indeed. Qin __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- - Henrik Andersson Netherlands Instit

Re: [R] ess in Windows (newbie Q)

2004-12-07 Thread Henrik Andersson
heck or do to proceed? See if this works, otherwise seek out the ESS mailing list! Cheers, Henrik - Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 5

[R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Henrik Andersson
Just a small suggestion since Windows have a file system not designed for command line use... Would it be possible to add the possibility of automatically adding/modifying the path to the R executables in the windows installer program? - Henrik

[R] Create a vector of combinations based on a table column names

2004-11-23 Thread Henrik Andersson
1 0 50 3 6.234 0 1 1 1 0 0 0 0 148 4 3.663 0 0 1 0 1 0 1 1 151 4 3.470 0 0 0 1 1 1 0 1 177 5 5.411 1 0 1 1 1 0 0 1 178 5 6.829 1 0 1 1 0 1 1 0 Question is how to make this not so manually? - Henri

[R] Reading sections of data files based on pattern matching

2004-10-25 Thread Henrik Andersson
with read.table("foo.txt",skip=startline,nrows=stoplin-startline) Or is there a more beautiful way? Cheers, --------- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31

Re: [R] Arrow heads at the end of axes

2004-10-21 Thread Henrik Andersson
Marc Schwartz wrote: On Thu, 2004-10-21 at 07:12, Henrik Andersson wrote: I would like to have arrow heads at the end of my axes, since I am plotting variable where the absolute amount is irrelevant, there is not supposed to be numbers on the axes. ... You can do something like this: plot

[R] Arrow heads at the end of axes

2004-10-21 Thread Henrik Andersson
or(0,1){3.2}} \put(-2,3.35){\makebox(0,0){$y$}} \end{picture} ----- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 577473 [EMAIL PROTECTED] http://www.nioo.knaw.nl/ppages/handersson

Re: [R] confidence interval for nls

2004-10-07 Thread Henrik Andersson
s$m$gradient()#this does, but only at the #observed data points Peter Dalgaard wrote: Henrik Andersson <[EMAIL PROTECTED]> writes: Do I have the right impression that it's currently not possible to produce confidence intervals for the nls predictions using R? I had a

[R] confidence interval for nls

2004-10-07 Thread Henrik Andersson
it be difficult to implement, I tried to dig into the help pages of nls, vcov and nlsModel but I could not really make sense out of this? - Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Ye

Re: [R] newsgroup on R

2004-09-02 Thread Henrik Andersson
Try news.gmane.org There you'll find gmane.comp.lang.r.general and gmane.emacs.ess.general /Henrik Bin Jiang wrote: HI, I wonder if there is a newsgroup on R available, instead of emaillist which I have to receive mails daily. Cheers. Bin __ [EMAIL PROT

[R] Accesing the name of an assigned object in a function

2004-09-01 Thread Henrik Andersson
"\n") } assigned.name <- stupid.function(whatever) or another example is a function that sinks the results to a text file and names it assigned.name.txt . I checked the help for function, <-, assign but could not find it, is it possible ? --------- He

Re: [R] direction of axes of plot

2004-06-28 Thread Henrik Andersson
Assume I want to put this into a function, how do I redefine the margins to fit better. I did par(mar=c(4.1,4.1,5.1,2.1) inside the function, but then it is not possible anymore to change them, I just want to change the default for this plotting function, how ? #---

[R] What happened to the excellent R-Newsletter ?

2004-06-25 Thread Henrik Andersson
u want to learn about multivariate data analysis (PCA, PLS, correspondence analysis) and how to do it in R ? Henrik Andersson __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! htt