Re: [R] switching to Linux, suggestions?
I'm using SUSE with success on intel laptop and AMD desktop. You get the best of both worlds: rpm and source. I can easily get the rpm packages i need, and compile on my own the things that i can spend time on (such as R 2.0.1 -- compiles out of the box on suse). BTW, I'm looking to switch to Mac platform. Anyone had any experience with that? I'm expecting on a power G4 laptop later this week hope R behaves... -- doktora On Mon, 13 Dec 2004 09:05:54 -0800 (PST), bogdan romocea [EMAIL PROTECTED] wrote: Before choosing a GNU/Linux distribution look into the package management issue. http://distrowatch.com/ I would suggest that you avoid all RPM-based distributions (Mandrake, Fedora, SuSE), and consider Debian (+ those based on it) the source-based distributions (such as Gentoo). I've been using Mandrake for a couple of years but got tired of RPM. HTH, b. -Original Message- From: Thomas W Volscho [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 3:24 PM To: [EMAIL PROTECTED] Subject: [R] switching to Linux, suggestions? Dear List, I have acquired a new desktop and wanted to put a free OS on it. I am trying Fedora Core 1, but not sure what the best Linux OS is for using R 2.0.1? Thank you in advance for your input, Tom Volscho Thomas W. Volscho Graduate Student Dept. of Sociology U-2068 University of Connecticut Storrs, CT 06269 Phone: (860) 486-3882 http://vm.uconn.edu/~twv1 __ [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 __ Dress up your holiday email, Hollywood style. Learn more. __ [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 __ [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
[R] R 2.0.1 and RODBC install problem
Hi all, I try to install the RODBC to no avail. Where is sql.h and sqltext.h supposed to come from? I don't have such files anywhere on my hdd! After downloading latest RODBC.tar.gz, I do R CMD INSTALL RODBC and get the following: * Installing *source* package 'RODBC' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for library containing SQLTables... -lodbc configure: creating ./config.status config.status: creating src/Makevars ** libs gcc -I/usr/local/lib/R/include -I/usr/local/include -fPIC -g -O2 -c RODBC.c -o RODBC.o RODBC.c:23:17: sql.h: No such file or directory RODBC.c:24:20: sqlext.h: No such file or directory RODBC.c:44: error: parse error before SQLCHAR RODBC.c:44: warning: no semicolon at end of struct or union RODBC.c:45: warning: data definition has no type or storage class RODBC.c:46: error: parse error before DataType [... goes on like this for a while, throughtout RODBC.c ...] make: *** [RODBC.o] Error 1 ERROR: compilation failed for package 'RODBC' ** Removing '/usr/local/lib/R/library/RODBC' ** Restoring previous '/usr/local/lib/R/library/RODBC' __ [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
[R] Switching to Mac, suggestions? (was switching to linux)
I'm looking to switch to Mac platform. Anyone had any experience with that? I'm expecting on a power G4 laptop later this week hope R behaves... -- dok __ [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
Re: [R] Calling R from a non-X shell script to plot?
Thank, bitmap produces huge and empty files. it could be my ghostscript, but there is no way to really tell, it's the latest version will try Xvfb On Mon, 13 Dec 2004 12:57:47 -0500, Liaw, Andy [EMAIL PROTECTED] wrote: See http://cran.us.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-produce-PNG-graphic s-in-batch-mode_003f Andy From: doktora v I am trying to run R from an apache C++ module in a shell script to plot some data to display it in apache later. I get the error (reported in apache's logs): Xlib: connection to :0.0 refused by server Xlib: No protocol specified Error in X11(paste(png::, filename, sep = ), width, height, pointsize, : unable to start device PNG In addition: Warning message: unable to open connection to X11 display`' Execution halted Is anyone familiar with this (i.e. running R from a non-X environment)? Is there a way to get around this? I've seen some stuff about virtual devices, but have no idea if it works or where to start. If there is a simpler solution, please let me know. -- doktora I run the following shell script from the apache module using execve: -- DISPLAY=:0.0 export DISPLAY if $R --vanilla --quiet $rfile $log ; then echo Success else echo There were errors in $0, see $log fi -- And $rfile contains this: -- png(filename = /tmp/plot.png, width = 510, height = 360); plot(some graph) dev.off() __ [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 -- Notice: This e-mail message, together with any attachment...{{dropped}} __ [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
Re: [R] R 2.0.1 and RODBC install problem
Thank you for pointing me in the right direction. As I believe I had done my effort to find the answer prior to posting, and had a driver manager installed (unixODBC 2.2.8) and the database odbc drivers (psqlodbc 7.2.4). However, it might suffice to notice, for future reference (shall anyone encounter this problem), that the odbc driver manager needs to be installed with its development module. Mine wasn't and, consequently, didn't have the header files (sql.h and sqlext.h) installed. -- dok On Mon, 13 Dec 2004 19:24:16 + (GMT), Brian D Ripley [EMAIL PROTECTED] wrote: From the DESCRIPTION file: SystemRequirements: An ODBC driver manager and drivers. See README. PLEASE do as it asks. On Mon, 13 Dec 2004, doktora v wrote: Hi all, I try to install the RODBC to no avail. Where is sql.h and sqltext.h supposed to come from? I don't have such files anywhere on my hdd! [...] PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Please do as we ask. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [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
Re: [R] Calling R from a non-X shell script to plot?
Ah, that's great. I was halfway on my way writing this out... Thanks, much appreciated! -- dok On Mon, 13 Dec 2004 13:51:00 -0800, Joe Conway [EMAIL PROTECTED] wrote: Seth Falcon wrote: On Mon, Dec 13, 2004 at 12:25:01PM -0500, doktora v wrote: Is anyone familiar with this (i.e. running R from a non-X environment)? Is there a way to get around this? I've seen some stuff about virtual devices, but have no idea if it works or where to start. If there is a simpler solution, please let me know. I've used Xvfb in this situation. After installing Xvfb, you can do something like this: Xvfb :15 export DISPLAY=localhost:15 # Run R FWIW, here's what I've used in the past for an Xvfb init script: 8 #!/bin/bash # # syslogStarts Xvfb. # # # chkconfig: 2345 12 88 # description: Xvfb is a facility that applications requiring an X frame buffer \ # can use in place of actually running X on the server # Source function library. . /etc/init.d/functions [ -f /usr/X11R6/bin/Xvfb ] || exit 0 XVFB=/usr/X11R6/bin/Xvfb :5 -screen 0 1024x768x16 RETVAL=0 umask 077 start() { echo -n $Starting Xvfb: $XVFB RETVAL=$? echo_success echo [ $RETVAL = 0 ] touch /var/lock/subsys/Xvfb return $RETVAL } stop() { echo -n $Shutting down Xvfb: killproc Xvfb RETVAL=$? echo [ $RETVAL = 0 ] rm -f /var/lock/subsys/Xvfb return $RETVAL } restart() { stop start } case $1 in start) start ;; stop) stop ;; restart|reload) restart ;; condrestart) [ -f /var/lock/subsys/Xvfb ] restart || : ;; *) echo $Usage: $0 {start|stop|restart|condrestart} exit 1 esac exit $RETVAL 8- HTH, Joe __ [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 __ [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
[R] Calling R from a non-X shell script to plot?
I am trying to run R from an apache C++ module in a shell script to plot some data to display it in apache later. I get the error (reported in apache's logs): Xlib: connection to :0.0 refused by server Xlib: No protocol specified Error in X11(paste(png::, filename, sep = ), width, height, pointsize, : unable to start device PNG In addition: Warning message: unable to open connection to X11 display`' Execution halted Is anyone familiar with this (i.e. running R from a non-X environment)? Is there a way to get around this? I've seen some stuff about virtual devices, but have no idea if it works or where to start. If there is a simpler solution, please let me know. -- doktora I run the following shell script from the apache module using execve: -- DISPLAY=:0.0 export DISPLAY if $R --vanilla --quiet $rfile $log ; then echo Success else echo There were errors in $0, see $log fi -- And $rfile contains this: -- png(filename = /tmp/plot.png, width = 510, height = 360); plot(some graph) dev.off() __ [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
[R] Moving standard deviation?
Is there a simple function in R to get a moving standard deviation (i.e. for the last x samples)? My goal is to plot bollinger bands around a moving average for price data. I use kernel smoothing for the moving average. cheers and thanks! over and out -- doktora __ [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
Re: [R] Moving standard deviation?
I have tried there but didn't find anything useful. Most of the matches are for functions which take a std dev input, and the moving part of the query relates to something else (like moving average in the qcc package). Anyway, it's not too difficult to create the function, but I was wondering if anyone had done it before. Efficiency is a concideration, naturally. I'll post what i come up with... cheers dok On Mon, 13 Dec 2004 10:04:59 -0800, Spencer Graves [EMAIL PROTECTED] wrote: A search for moving standard deviation at www.r-project.org - search - R site search just produced 7 matches. Please look at those and let us know if none of those help you (and what you tried that didn't work). spencer graves doktora v wrote: Is there a simple function in R to get a moving standard deviation (i.e. for the last x samples)? My goal is to plot bollinger bands around a moving average for price data. I use kernel smoothing for the moving average. cheers and thanks! over and out -- doktora __ [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 -- Spencer Graves, PhD, Senior Development Engineer O: (408)938-4420; mobile: (408)655-4567 __ [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
Re: [R] Calling R from a non-X shell script to plot?
So, it turns out that using Xvfb is quite simple and works great (fast). To summ up: if you are trying to plot a png file from a non-X environment, run Xvfb, like so (for example): Xvfb :9 -screen 0 800x600x16 This will run a virtual X server 9 with screen 0. In your shell script (or whatever other environment you are using), set the DISPLAY environment variable to :9.0: DISPLAY=:9.0 export DISPLAY presto -- dok On Mon, 13 Dec 2004 13:32:23 -0500, Rajarshi Guha [EMAIL PROTECTED] wrote: On Mon, 2004-12-13 at 12:25 -0500, doktora v wrote: I am trying to run R from an apache C++ module in a shell script to plot some data to display it in apache later. I get the error (reported in apache's logs): Xlib: connection to :0.0 refused by server Xlib: No protocol specified Error in X11(paste(png::, filename, sep = ), width, height, pointsize, : unable to start device PNG In addition: Warning message: unable to open connection to X11 display`' Execution halted I use the following when I need to plot a graphic by calling R from a PHP script on my webserver bitmap(file=plotfile, height=7, width=7) par(pch=19, col='black', cex=1.5) plot(log(1/boxsize), log(bv), ylab=log(box count), xlab=log(1/box size)) --- Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- Science kind of takes the fun out of the portent business. -Hobbes __ [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
[R] C/C++
Hey everyone, I have been looking for a while for ways to integrate R's wonderful functions into my C++ software, but I have not found anything concrete. So finally, i post to this list to see if anyouse else knows about this, or has done it!? Is it possible? Are there C++ or C R libraries? Or is it sufficiently easy to build them? your help is much appreciated! thanks doktora __ [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