Re: [R] dyn.load a f90 module.
> If there are symbols present then unix 'nm' should show them to you. Interestingly: % nm myfile.so 0004fc T myfile_ % R > dyn.load('myfile.so') > is.loaded('myfile_') [1] TRUE > ..Fortran('myfile_') Error in .Fortran('myfile_'): 'Fortran" function name not in load table. So, myfile_ is loaded but is not callable by R? Bo __ 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] dyn.load a f90 module.
Dear list, Has there been any success in loading modules written in f90? I tried % ifort -c myfile.f90 % R CMD SHLIB myfile.o % R dyn.load('myfile.so') .Fortran('myfile') I used intel (free) fortran compiler under linux. All commands run successfully except that function myfile is not loaded. (Is there a function/tool to list symbols in a .so file?) Many thanks in advance. Bo __ 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] R GUI for Linux?
> > > ESS looks very good but why should I load more than 30MB on the memory > > > to work on a text file ? and why do I need to lear all the tricks and > > > features of emacs just to edit a text file ? One of the advantages (and disadvantages) of linux applications like emacs is that you can, if you know how to, customize it to your taste so you do not have to 'learn all the tricks and features' of it. You can use cua package if you are used to C-x,C-c,C-v and other windows stuff. You can change keybindings of ESS if you do not like them. The reason why I like ESS is that I can step through or run a piece of R code easily. For my ESS installation, I have several ESS buttons on the toolbar to start R, eval line and step, eval region and eval function. I have also linked these functions to shortcuts F9,F10,F11 by defining (define-key ess-mode-map (kbd "") (quote ess-eval-line-and-step)) (define-key ess-mode-map (kbd "") (quote ess-eval-region)) (define-key ess-mode-map (kbd "") (quote ess-eval-buffer)) in .emacs. I do not see any reason why an embedded R session would occupy more RAM than a standalone R session, other than the time/RAM emacs uses to color the output. This can be a problem if the output is extremely long so I usually clean the R-cmd buffer once a while. Bo __ 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] How to break an axis?
> Tom Mulholland has already pointed out that the plotrix package has an > axis.break() function that will draw the break symbol. Your problem is a > combination of plotting two disparate sets of data and getting the > y-axis right. The following is one way to do it, just be careful that > the ylim= and labels= arguments match up. > > y1<-1+rnorm(10)/5 > y2<-3+rnorm(10)/5 > y3<-4+rnorm(10)/5 > y4<-397+rnorm(10)/5 > library(plotrix) > plot(y1,ylim=c(0,10),axes=FALSE,main="Big range plot",ylab="Y values") > points(y2) > points(y3) > box() > axis(2,at=c(1,2,3,4,6,7,8,9),labels=c("1","2","3","4","396","397","398","399")) > axis.break(2,5) > par(new=TRUE) > plot(y4,ylim=c(390,400),axes=FALSE,main="",ylab="",xlab="") > Thank you very much for the real code. I did almost exactly the same thing. I did not know the new=TRUE option so I used lines(y4-offset, ...). Anyway, the results are the same. The left-right-axes solution is also very interesting. It is actually better if the ranges of lines differ significantly. Thank you again for the help. Bo __ 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] How to break an axis?
Dear list, I need to plot four almost horizontal lines with y-values around 1,3,4, 400. If I plot them directly, the first three lines will be indiscernible so I am thinking of breaking y-axis into two parts, one with range (0,5), another (395,400). Is there an easy way to do this? I can think of two ways: 1. use two plots and draw axes manually. The plot margins, are however difficult to adjust. 2. use one plot, adjust y-values of the lines and draw y-axis manually. But, how would I break y-axis and add separation symbols *on* yaxis? (By separation symbol, I mean something like --//-- Many thanks in davance. Bo __ 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] read matlab .mat file?
Hi, Is there an easy way to read matlab .mat file from R? There are R packages (R.matlab, R.io from google) around but I might just missed some easy functions. Many thanks in advance. -- Bo Peng __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] How to list functions in a library?
Thank you all for your apply. Both commands works. For example, library(help=MASS) will list function names with description and ls(package:MASS) will list all object names. -- Bo Peng __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] How to list functions in a library?
I am sorry for such a simple question but I just could not find a command to list functions (objects) in a certain library. I had to refer to library documents (often not readily available ) to find them. Many thanks in advance. -- Bo Peng __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R-1.6.2: installation problem on Solaris 2.8
> > There is a bug in gcc-3.2.1 (and 3.2.2) on Solaris. Don't use them. > > It has been reported and acknowledged by the gcc maintainers. I changed to gcc-2.95.3 (by setting CC and CXX environment variables) and everything is fine now. Thanks. -- Bo Peng __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R-1.6.2: installation problem on Solaris 2.8
On Thu, Mar 20, 2003 at 07:29:00AM +, [EMAIL PROTECTED] wrote: > > I tried to compile R-1.6.2 from source on Solaris 2.8. There is no > > problem with configure and make. However, `make test' fails with error > > message: > [...] > > I am using gcc 3.2.1, I can supply further info if necessary. > There is a bug in gcc-3.2.1 (and 3.2.2) on Solaris. Don't use them. > It has been reported and acknowledged by the gcc maintainers. That is unfortunate. Is there any work-around? I tried to set environment variable cpp as /usr/site/gcc-2.95.3/bin/gcc or gcc-3.0.4 but ./configure says ... checking command to parse /usr/ccs/bin/nm -p output... ok checking how to run the C preprocessor... /usr/site/gcc-2.95.3/bin/gcc configure: error: C preprocessor "/usr/site/gcc-2.95.3/bin/gcc" fails sanity check See `config.log' for more details. -- Bo Peng __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] R-1.6.2: installation problem on Solaris 2.8
Hello, I tried to compile R-1.6.2 from source on Solaris 2.8. There is no problem with configure and make. However, `make test' fails with error message: [EMAIL PROTECTED]:~/trial/R-1.6.2 % make check make[1]: Entering directory `/home/helpdesk/trial/R-1.6.2/tests' make[2]: Entering directory `/home/helpdesk/trial/R-1.6.2/tests' make[3]: Entering directory `/home/helpdesk/trial/R-1.6.2/tests/Examples' make[4]: Entering directory `/home/helpdesk/trial/R-1.6.2/tests/Examples' make[4]: Leaving directory `/home/helpdesk/trial/R-1.6.2/tests/Examples' make[4]: Entering directory `/home/helpdesk/trial/R-1.6.2/tests/Examples' collecting examples for package 'base' ... make[5]: Entering directory `/home/helpdesk/trial/R-1.6.2/src/library' >>> Building/Updating help pages for package 'base' Formats: text example make[5]: Leaving directory `/home/helpdesk/trial/R-1.6.2/src/library' running code in 'base-Ex.R' ...make[4]: *** [base-Ex.Rout] Error 1 make[4]: Leaving directory `/home/helpdesk/trial/R-1.6.2/tests/Examples' make[3]: *** [test-Examples-Base] Error 2 make[3]: Leaving directory `/home/helpdesk/trial/R-1.6.2/tests/Examples' make[2]: *** [test-Examples] Error 2 make[2]: Leaving directory `/home/helpdesk/trial/R-1.6.2/tests' make[1]: *** [test-all-basics] Error 1 make[1]: Leaving directory `/home/helpdesk/trial/R-1.6.2/tests' make: *** [check] Error 2 If I ignore this and run `make install' etc, R seems to be running fine untile I plot anything like `plot(1,1)'. One graphics window will appear and disappear, R will die saying 'bus error'. I am using gcc 3.2.1, I can supply further info if necessary. Thanks. -- Bo Peng __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help