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] Load a program at the front end

2008-10-07 Thread Scionforbai
Is Rscript what you want? http://stat.ethz.ch/R-manual/R-patched/library/utils/html/Rscript.html >From the docs I can't see if it allows interactivity (also through tcl/tk). Still, give a look. ScionForbai __ R-help@r-project.org mailing li

Re: [R] Question about graphical UI running R version 2.7.0 (2008-04-22) on Ubuntu Hardy Heron...

2008-05-17 Thread Scionforbai
Have a look at RKWard (http://rkward.sourceforge.net/), for kde. I don't know though if Ubuntu has it in its repos. __ 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.or

Re: [R] Font settings in xfig

2008-05-16 Thread Scionforbai
he correct Latex math strings (like $\sigma^2$). Hope this helps, 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
tors or to a 6x3 dataframe. solution 1: myData <- cbind(td,contractdate,price) > library(rgl) plot3d(mydata) solution 2: td <- as.numeric(td) ... price <- as.numeric(price) plot3d(td,contractdate,price) Bye, ScionForbai __ R-help@r-pr

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 d

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] Which Linux OS on Athlon amd64, to comfortably run R?

2007-12-05 Thread Scionforbai
community. It is the best way to get things 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 ___

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

2007-12-05 Thread Scionforbai
, and you calculate the mean of the points of the two matrixes. This is the simplest (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@

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 comfort

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 http://www.R-project.

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, wh

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 alw

[R] Yet Another Image Format: tikz/pgf

2007-11-13 Thread Scionforbai
like maps). 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,an

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,

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? Peop

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 stren

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 https://stat.ethz.

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 mai

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 >> ridiculou

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

2007-10-06 Thread Scionforbai
> kate infact allows you to pipe commands to console (tools->pipe to > console). I have pretty much the same setup as you. But I have defined > a shortcut for piping the commands to console in kate. So I just > have to highlight commands using shift and arrow keys, and press F4 > (my shortcut) and

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

2007-10-06 Thread Scionforbai
Hi, > What features are you missing in emacs that you wish were there? Are > these ESS features or LaTeX related features? 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? (linux here)

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

2007-10-05 Thread Scionforbai
r), but it works 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
d it has a certain degree 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/

Re: [R] Time series graphs

2007-09-20 Thread Scionforbai
In pure R (without other packages) is IMHO simpler to understand (at least if data are so simple: months 1 till 9 with no missing values...). All you need is: dummybob <- ' month A B Jan 8 4 Feb 7 5 Mar 6 8 Apr 3 7 May 5 1 Jun 6 4 Jul 2 8 Aug 1 2 Sep 4 3 ' bob <- read.t

Re: [R] Plotmath issue superscript "-"

2007-09-20 Thread Scionforbai
n is: platform i686-redhat-linux-gnu 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 _

Re: [R] Plotmath issue superscript "-"

2007-09-20 Thread Scionforbai
Try: plot(0,0,"n") text(0,0,expression( {NO[3]}^'-')) __ 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

Re: [R] combine mathematical expressions with plain text

2007-09-20 Thread Scionforbai
plot(0,0,"n") mtext( expression( bar(x) == 3.07) ) but you can also simply 'paste' things: text(0,0,labels=expression(paste(bar(omega), " = 1")),srt=90) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] off-topic: better OS for statistical computing

2007-09-11 Thread Scionforbai
> My question is what is the best OS on PC (laptop) for statistical > computing and why. A free/open source *nix operating system is the best you can have todate, for almost everything, noticeably stability, security, scalability, networking and development, given that your hardware is supported a