[R] readline not found
Hi all, I just upgraded to R-1.8.0. Everything worked fine but command line editing does not work. This clearly indicates that readline has not been found in the compilation process. How could I explicitely indicate where to find it ? I use a Red Hat 8.0 system. I checked the FAQ which says readline-devel is also needed, but I have it already installed. Perhaps should I add the configure option --with-readline=path/to/readline ? rpm -qva | grep readline readline-4.3-4 readline-devel-4.3-4 readline41-4.1-14 Is there a problem with that readline41 version ? Thanks in advance, Laurent __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] readline not found
The problem is solved. I cc this mail to John who probably had the same kind of problem. Peter Dalgaard wrote: Laurent Faisnel [EMAIL PROTECTED] writes: That's the part of the log where you have the debug information (at the top) : configure:11773: gcc -o conftest -g -O2 -L/usr/local/lib conftest.c -lreadline -ldl -lm 5 /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetnum' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgoto' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetflag' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `BC' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tputs' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `PC' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetent' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `UP' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetstr' Oho... I think those routines are from libncurses, I'm very impressed by your intuition (or memory). That's exactly where the problem was. so you might be needing ncurses-5.2-28 I already had this one installed. Not sufficient. ncurses-devel-5.2-28 But not this one. Once it is installed, evrything works fine and I have a readline-enabled R version. (not sure you really need the last one, but...) It's really needed. More info : http://dbforums.com/arch/147/2002/12/608415 (exactly the same) Peter : Thanks a lot. John : Hope it's a solution to your problem too. - Laurent __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] problems trying to extend a class
Hi all, I have been using for quite a long time a script where a class extends another one (without trouble). But I now have problems of that kind while trying to run the script : Error in insertMethod(methods, sig, args, def, TRUE) : inserting method corresponding to empty signature I think this may be because the way I wrote the scripts could be deprecated. Indeed I recently upgraded to R-1.7.1 (I compiled it from source). I use R on a RedHat 8.0 system. This is how my classes look like : #- # CLASSPerson #- setClass(Person,representation(name=character)); # CONSTRUCTOR setMethod(initialize,Person, function(.Object) { [EMAIL PROTECTED] - Unknown; # default name return(.Object); } ); #- # CLASSEmployee (extends Person) #- setClass(Employee,representation(Person, service=character, con=MySQLConnection)); # con : connection to be established with MySQL database # constructor setMethod(initialize,Employee, function(.Object) { .Object - callNextMethod(); # calls the superclass constructor [EMAIL PROTECTED] - dbConnect(MySQL); [EMAIL PROTECTED] - unknown service; return(.Object); } ); The script just creates a new Employee and the error occurs when it comes to callNextMethod() : library(RMySQL) new(Person) An object of class Person Slot name: [1] Unknown new(Employee) Error in insertMethod(methods, sig, args, def, TRUE) : inserting method corresponding to empty signature Any help would be greatly appreciated. Laurent PS : I've read there's something related to this in R-1.7.1's new features, but it does not seem to match the problem exactly (problems that used to wait until new() is called to appear are now caught properly). Is the initialize() function deprecated ? Should I use prototype instead ? __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] installation : make fails (R-1.7.1 on RedHat 8.0)
Peter Dalgaard BSA wrote: Laurent Faisnel [EMAIL PROTECTED] writes: Hi, I'm trying to compile R-1.7.1 from source (on a RedHat 8.0) instead of using the binary version, as it has often been advised. However I don't manage to find a solution to the following error which occurs during the make procedure : gcc -I../../../../include /usr/include/mysql -D__NO_MATH_INLINES ** -mieee-fp -fPIC -g -O2 -c ansari.c -o ansari.o The stars indicate the problem. This wants to -I/usr/include/mysql if anything, otherwise gcc will believe that there are two files to compile and complain about the -o. I suspect that you entered the wrong thing during configuration. Peter, Thanks for your answer, but everything is not clear to me. This installation was made with the default ./configure without any additional option (so if I made something wrong, it is to forget an option). I checked out ./configure --help. What should I add ? I don't believe there are headers or libraries in unusual places on my disk. Moreover, why does the script search for mysql now ? I'm interested by mysql, but this comes later with RMySQL ! Anyway, mysql headers *are* in /usr/include/mysql. Regards, Laurent __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] installation : make fails (R-1.7.1 on RedHat 8.0)
Peter Dalgaard BSA wrote: Laurent Faisnel [EMAIL PROTECTED] writes: Peter Dalgaard BSA wrote: Laurent Faisnel [EMAIL PROTECTED] writes: Hi, I'm trying to compile R-1.7.1 from source (on a RedHat 8.0) instead of using the binary version, as it has often been advised. However I don't manage to find a solution to the following error which occurs during the make procedure : gcc -I../../../../include /usr/include/mysql -D__NO_MATH_INLINES ** -mieee-fp -fPIC -g -O2 -c ansari.c -o ansari.o The stars indicate the problem. This wants to -I/usr/include/mysql if anything, otherwise gcc will believe that there are two files to compile and complain about the -o. I suspect that you entered the wrong thing during configuration. Peter, Thanks for your answer, but everything is not clear to me. This installation was made with the default ./configure without any additional option (so if I made something wrong, it is to forget an option). I checked out ./configure --help. What should I add ? I don't believe there are headers or libraries in unusual places on my disk. Moreover, why does the script search for mysql now ? I'm interested by mysql, but this comes later with RMySQL ! Anyway, mysql headers *are* in /usr/include/mysql. That's not the problem. The problem is that the /usr/include/mysql sneaked into your configuration files somehow. This can happen by other means than configure options:. environment variables or configuration files (~/.Rconf) are the two that I can recall just now. I fixed the problem. You gave me the decisive clue : it was a problem with environment variables. I had the two following definitions : PKG_CPPFLAGS=/usr/include/mysql and PKG_CPPLIBS=/usr/lib/mysql I set both variables to and now make works fine. Thanks again. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R Production Performance
Zitan Broth wrote: Greetings All, Been playing with R and it is very easy to get going with the UI or infile batch commands :-) What I am wondering is how scalable and fast R is for running as part of a web service. I believe R is written in C which is a great start, but what are peoples general thoughts on this? Thanks greatly, Z. I use R in such a way. R is called by dynamic pages written in PHP, performs a calculation and writes results in a XML file. Results are then read by other pages. Performances still could be better but I haven't tried every solution yet (RSOAP seems very interesting). MySQL database access is made thanks to RMySQL. Anyway, R is not incompatible with such projects. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] 3D plot/surface rotation
[EMAIL PROTECTED] wrote: How do I rotate 3D plots/surfaces generated by either cloud or wireframe? wireframe - I think you have to set the screen parameter, see the example from ?wireframe, it seems to me you can rotate the surface as you like. I believe it's the same thing for cloud, but I did not test it. I don't know if it's possible for you but persp is also good for 3D surfaces. Then you just have to set the theta and phi parameters. Hope this helps, Laurent __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Problem in installing quantreg package
Swagata Nandi wrote: Hi, I was trying to install quantreg package in an R session, but got the following error message: ERROR: cannot write to or create directory '/usr/lib/R/library' Can anyone suggest what I need to do? Swagata Nandi __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help You probably have not the right to write in that directory. You should either ask your system's administrator to grant you the needed privileges or find another directory in which you can write an then read the package's doc to find out any configuration option to specify the installation directory). Hope this helps, Laurent __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] R-1.7.1 gets installed without default packages withoutreadline
Hi all, Trying to install R-1.7.1 on a RedHat 8.0 platform, I have a few problems. R gets installed without default packages (but base and ctest) : make script fails at the end of the procedure (configure is made successfully). This is the (translated) log I have : /gcc -I../../../../include /usr/include/mysql -D__NO_MATH_INLINES -mieee-fp -fPIC -g -O2 -c ansari.c -o ansari.o gcc: cannot specify -o with -c or -S and multiple compilations make[5]: *** [ansari.o] Error 1 make[5]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest/src' make[4]: *** [all] Error 2 make[4]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest/src' make[3]: *** [all] Error 1 make[3]: Leaving directory `/usr/local/R-1.7.1/src/library/ctest' make[2]: *** [R] Error 1 make[2]: Leaving directory `/usr/local/R-1.7.1/src/library' make[1]: *** [R] Error 1 make[1]: Leaving directory// `/usr/local/R-1.7.1/src' make: *** [R] Error 1 / However it's possible to start R but I have only base and ctest, and subsequently many warnings are displayed at startup. The only solution I found was to copy-paste libraries from a RPM version (which gets installed without trouble). Probably not a good solution. I already read carefully R-admin. What should I try now ? Moreover, I have a problem with readline. First I did not manage to make the configure script satisfied about readline. I found in R archives that readline-devel should be present too. I downloaded it, indeed the configure script is now OK with readline. But I still have no command-line facilities enabled under R. Why ? [EMAIL PROTECTED] home]# rpm -qva | grep readline readline-4.3-3 readline-devel-4.3-3 readline41-4.1-14 Thanks for any help. Laurent __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R-1.7.1 gets installed without default packages withoutreadline
Thomas W Blackwell wrote: Laurent - I had no trouble with configuring, compiling and running R under Redhat 8.0. My system now gives uname -a Linux host 2.4.18-14smp #1 SMP Wed Sep4 12:34:47 EDT 2002 i686 i686 i386 GNU/Linux I have the same rpm -qa | grep readline readline41-4.1-14 readline-4.3-4 readline-devel-4.3-3 The only difference I can see is that I have readline-4.3-4, while you show readline-4.3-3. So now I remember: on CRAN, somewhere near the R source rpm for linux when I downloaded it there is a special readline rpm, and a readme file from Martyn Plummer which says, in part, Graeme Ambler has kindly provided patched rpms. His gpg ID is 62897321 and his public key is available from pgp.net (see below). I've found all this, thanks. In fact, there is also a newer version of readline-devel (4.3-4). I updated both libraries. But unfortunately I still have the same problems. Is it so hard to switch from R's rpm version to the compiled one ? Source version allows you to choose compilation options and this may become necessary for me. Somehow, I got readline-4.3-4 out of that rpm. H. All seems to work fine for me. - tom blackwell - u michigan medical school - ann arbor - __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] S3 and S4 classes
I've made some changes (in bold) following your comments : # class definition : setClass(MyClass, representation(mynumber=numeric)); # the initilization method : setMethod(initialize,MyClass, function(.Object) { [EMAIL PROTECTED] - 10; return(.Object); } ); # defining the generic function generates a warning message (already generic function)- but everything works fine without it - so it seems better not to use it *setGeneric(perform, function(object) standardGeneric(perform)); * # the perform method definition - this alone seems sufficient for me, and S4-looking *setMethod(perform,MyClass,** function(object) { [EMAIL PROTECTED] - [EMAIL PROTECTED] + 10; return(object); } **);* I replaced my unlucky /.Object/ by /object/ but for method initialize. The execution of my program used to begin with an output like : Creating a new generic function for perform With the setMethod only, there is not this output any longer. Does this mean that the execution becomes faster ? Thank you for your fast and useful answers. I've found an interesting R help page I had never seen before at http://www.maths.lth.se/help/R/S3toS4 which gives additionnal information about S3 and S4 classes. Regards, Laurent http://www.maths.lth.se/help/R/S3toS4/ [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help