Re: [R] Solution to differential equation

2010-12-15 Thread Scionforbai
I am trying to find the analytical solution to this differential equation dR/dt = k1*(R^k2)*(1-(R/Rmax)); R(0) = Ro If there is an analytial solution to this differential equation then it It is a polynomial function of R, so just develop the expression and when you get the two terms in R

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-20 Thread Scionforbai
Which format is better? pdf, jpeg or tiff? png and jpeg are bitmap formats, and you can trigger the resolution playing with options width, height (in pixels) and res (nominal DPI) till you find what is suitable for your purpose. Png is definitely the way to go for graphs. Pdf is the overall best

Re: [R] Linux Editor

2010-08-02 Thread Scionforbai
Hi, I recently have started using R again on a Linux box after spending several years on a Mac. Last I checked, the best way to use R was through EMACS using something like ESS. I remember that being serviceable but not always the most convenient. Is there anything comparable to the mac

Re: [R] Font settings in xfig

2008-05-16 Thread Scionforbai
, scionforbai __ R-help@r-project.org 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.

Re: [R] 3d plotting

2007-12-18 Thread Scionforbai
) plot3d(mydata) solution 2: td - as.numeric(td) ... price - as.numeric(price) plot3d(td,contractdate,price) Bye, ScionForbai __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] margin between plot region and axes

2007-12-17 Thread Scionforbai
My question: is there a way to add axes the usual way (as tried for the first graphic), but to erase the margin, so that the axes start at point (0/0) in my case. Not really sure if this is what you ask, but maybe you should call your first plot() with xaxs=i and yaxs=i. It reduces the default

Re: [R] how to let R read different equations I write and execute it?

2007-12-10 Thread Scionforbai
Hi Czqiu, short answer: ?expression ?eval ?quote ?parse ?deparse ?substitute Bye, Scionforbai __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] 2/3d interpolation from a regular grid to another regular grid

2007-12-05 Thread Scionforbai
(and quickest) moving average that you can do. For more complicated examples, and for 3d, you have to go a little further, but the principle holds. ScionForbai __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Which Linux OS on Athlon amd64, to comfortably run R?

2007-12-05 Thread Scionforbai
working and avoid problems. Should I install another flavour of Linux ? It depends. Ubuntu is good to start, and has the widest users base; Archlinux my best choice (but you need to be already somewhat advanced). ScionForbai __ R-help@r-project.org

Re: [R] 2/3d interpolation from a regular grid to another regular grid

2007-12-04 Thread Scionforbai
- krigging in package fields, which also requires irregular spaced data That kriging requires irregularly spaced data sounds new to me ;) It cannot be, you misread something (I feel free to say that even if I never used that package). It can be tricky doing kriging, though, if you're not

Re: [R] R as server application

2007-11-29 Thread Scionforbai
I found this link: http://jesus-loves-grass.blogspot.com/search/label/R%20server Which points to RSOAP and Rserver. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Fortran Code to R Code

2007-11-28 Thread Scionforbai
help.start(), then Writing R extensions. You can link fortran subroutines to R by compiling them in a shared library (.so or .dll depending on your system) by the command: R CMD SHLIB file1.f file2.f -o myfortransubroutines.so and then from R you first dyn.load(myfortransubroutines.so) and

Re: [R] how to calculate the return?

2007-11-24 Thread Scionforbai
Hi Denver, I want to calculate the return say AMR,so I use If data is a matrix or a data.frame you need to use the correct index: [row,col] instead of [row]. Try: re=numeric(10) for (i in 2:nrow(data)) { re[1]=0 re[i]=log(data[i,1]/data[i-1,1]) } This works, but of course you have

Re: [R] R as server application

2007-11-21 Thread Scionforbai
Do you need something more than a simple ssh connection to a remote host in which you run R (trivial when the server is Linux)? My advice is to run R in a screen session on the remote host (it protects from sudden disconnections). Then you have a window on your screen with the R command line,

Re: [R] Generating log transformed random numbers

2007-11-14 Thread Scionforbai
If what you want is a lognormal distribution of n values you can use the following transformations: lognorm1 - M*exp((rnorm(n)*sigma)-sigma^2/2.) which gives a lognormal distribution such that: mean(lognorm1)=M ; var(lognorm1)=M^2*(exp(sigma^2)-1); Changing the sigma (standard deviation) you

[R] Yet Another Image Format: tikz/pgf

2007-11-13 Thread Scionforbai
). ScionForbai __ R-help@r-project.org 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.

Re: [R] Graphics - plotting two graphs

2007-10-24 Thread Scionforbai
plot(x1,y1,b,xlim=range(x1), ylim=c(0, 170),pch=16,cex=2,axes=FALSE,ann=FALSE) par(col=grey50, fg=grey50, col.axis=grey50) axis(1, at=seq(0, 16, 4)) axis(2, at=seq(0, 170, 10)) axis(4, at=seq(0, 170, 10)) par(new=TRUE) plot(x2,y2,b,xlim=range(x2), ylim=c(0, 170),pch=21,cex=2,axes=FALSE,ann=FALSE)

Re: [R] image quality of plot inserted into PowerPoint

2007-10-18 Thread Scionforbai
Any suggestions? When generating a bitmap (png is then the best solution) you can control the resolution with width and height parameters (in pixels): png(myimage.png,width=1800,height=1800) Then you just need to raster yor graph in an adequate resolution (more pixels means bigger file, of

Re: [R] Import from excel 2007

2007-10-17 Thread Scionforbai
It would be dumb to ignore the fact that Excel is a very widespread program, and therefore in the real world we are very likely to encounter data formatted by Excel. Of course I know the widespreading of such programs. But the point is: how can we start to change this in the real world? People

Re: [R] R-2.6.0 - packages installation through a proxy - not working

2007-10-16 Thread Scionforbai
I would start R with the command: http_proxy=http://SERVER:3128; R and then from R I would try: install.packages(Rcmdr, dep = TRUE, method = wget) provided that you have wget installed on your system (which I think). __ R-help@r-project.org mailing

Re: [R] Import from excel 2007

2007-10-16 Thread Scionforbai
Such workarounds should normally be avoided. You forgot to mention: Excel should normally be avoided. Risk of scrambling data while exporting to a simple ascii formatted text file? Is it a joke? __ R-help@r-project.org mailing list

Re: [R] Import from excel 2007

2007-10-16 Thread Scionforbai
I just wonder: why should R and its community try to support such an awful program, with its protected formats and unmantained features/bugs? I mean, from both philosophical and technical point of view: R is free software and should rather try to be 'viral' than to compete. It already has the

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-09 Thread Scionforbai
is it only me or has anyone else the problem that running an R process within emacs is way much slower than in a regular terminal/ console? It's just you, and if you think some more about it, you'll see why we are all grinning. [ Hint: it can't be slower, outside of ridiculous corner

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-05 Thread Scionforbai
great. ScionForbai __ R-help@r-project.org 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.

Re: [R] Speeding up image plots

2007-10-01 Thread Scionforbai
of continuity. I very often have to produce 512x512 images, and it doesn't seem to be any particularly intensive procedure; I mean, it is done within seconds. ScionForbai __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Plotmath issue superscript -

2007-09-20 Thread Scionforbai
version.string R version 2.4.1 (2006-12-18) locale is: LANG=it_IT.UTF-8 What is this multibyte string? Does it depend on LOCALE settings? Where can I find further docs on this way to pass character descriptors? Thanks, ScionForbai __ R-help@r-project.org